• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • Examples
  • File List
  • Globals

cms/openid/Services/Yadis/HTTPFetcher.php

Go to the documentation of this file.
00001 <?php
00002 
00016 class Services_Yadis_HTTPResponse {
00017     function Services_Yadis_HTTPResponse($final_url = null, $status = null,
00018                                          $headers = null, $body = null)
00019     {
00020         $this->final_url = $final_url;
00021         $this->status = $status;
00022         $this->headers = $headers;
00023         $this->body = $body;
00024     }
00025 }
00026 
00035 class Services_Yadis_HTTPFetcher {
00036 
00043     function allowedURL($url)
00044     {
00045         return $this->URLHasAllowedScheme($url);
00046     }
00047 
00053     function URLHasAllowedScheme($url)
00054     {
00055         return (bool)preg_match('/^https?:\/\//i', $url);
00056     }
00057 
00061     function _findRedirect($headers)
00062     {
00063         foreach ($headers as $line) {
00064             if (strpos($line, "Location: ") === 0) {
00065                 $parts = explode(" ", $line, 2);
00066                 return $parts[1];
00067             }
00068         }
00069         return null;
00070     }
00071 
00084     function get($url, $headers)
00085     {
00086         trigger_error("not implemented", E_USER_ERROR);
00087     }
00088 }
00089 
00090 ?>

Generated on Sun Jan 2 2011 04:55:32 for Pragyan CMS by  doxygen 1.7.1