diff options
author | tailor <cygnus@janrain.com> | 2006-01-13 23:44:12 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2006-01-13 23:44:12 +0000 |
commit | db97dc546fe67ee18b404a9f26762a68ca7c4797 (patch) | |
tree | 9d7b0d36d87960e198c94fd3d0fda46331034958 | |
parent | d4c0cf90e996cc74a458f9d1654cc376695e5396 (diff) | |
download | php-openid-db97dc546fe67ee18b404a9f26762a68ca7c4797.zip php-openid-db97dc546fe67ee18b404a9f26762a68ca7c4797.tar.gz php-openid-db97dc546fe67ee18b404a9f26762a68ca7c4797.tar.bz2 |
[project @ Updated Fetchers docs]
-rw-r--r-- | Net/OpenID/Consumer/Fetchers.php | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/Net/OpenID/Consumer/Fetchers.php b/Net/OpenID/Consumer/Fetchers.php index d766a1d..8ad2c26 100644 --- a/Net/OpenID/Consumer/Fetchers.php +++ b/Net/OpenID/Consumer/Fetchers.php @@ -24,12 +24,14 @@ $_Net_OpenID_socket_timeout = 20; */ $_Net_OpenID_allowed_schemes = array('http', 'https'); +/** + * This class is the interface for HTTP fetchers the OpenID consumer + * library uses. This interface is only important if you need to + * write a new fetcher for some reason. + * + * @package OpenID + */ class Net_OpenID_HTTPFetcher { - /** - * This class is the interface for HTTP fetchers the OpenID - * consumer library uses. This interface is only important if you - * need to write a new fetcher for some reason. - */ function get($url) { trigger_error("not implemented", E_USER_ERROR); @@ -77,7 +79,16 @@ function Net_OpenID_allowedURL($url) return false; } +/** + * This class implements a plain, hand-built socket-based fetcher + * which will be used in the event that CURL is unavailable. + * + * @package OpenID + */ class Net_OpenID_PlainHTTPFetcher extends Net_OpenID_HTTPFetcher { + /** + * @access private + */ function _fetch($url) { $data = @file_get_contents($url); @@ -226,6 +237,8 @@ function _writeData($ch, $data) /** * A paranoid Net_OpenID_HTTPFetcher class which uses CURL for * fetching. + * + * @package OpenID */ class Net_OpenID_ParanoidHTTPFetcher extends Net_OpenID_HTTPFetcher { function Net_OpenID_ParanoidHTTPFetcher() @@ -237,6 +250,9 @@ class Net_OpenID_ParanoidHTTPFetcher extends Net_OpenID_HTTPFetcher { } } + /** + * @access private + */ function _findRedirect($headers) { foreach ($headers as $line) { |