Auth_Yadis_HTTPFetcher
in package
This class is the interface for HTTP fetchers the Yadis library uses. This interface is only important if you need to write a new fetcher for some reason.
Tags
Table of Contents
- $timeout : mixed
- _findRedirect() : null|string
- allowedURL() : bool
- Return whether a URL should be allowed. Override this method to conform to your local policy.
- canFetchURL() : bool
- Return whether a URL can be fetched. Returns false if the URL scheme is not allowed or is not supported by this fetcher implementation; returns true otherwise.
- get() : Auth_Yadis_HTTPResponse|null
- Fetches the specified URL using optional extra headers and returns the server's response.
- isHTTPS() : bool
- Is this an https URL?
- supportsSSL() : bool
- Does this fetcher implementation (and runtime) support fetching HTTPS URLs? May inspect the runtime environment.
- URLHasAllowedScheme() : bool
- Is this an http or https URL?
Properties
$timeout
public
mixed
$timeout
= 20
Methods
_findRedirect()
public
_findRedirect(array<string|int, mixed> $headers, string $url) : null|string
Parameters
- $headers : array<string|int, mixed>
- $url : string
Tags
Return values
null|string —allowedURL()
Return whether a URL should be allowed. Override this method to conform to your local policy.
public
allowedURL(string $url) : bool
By default, will attempt to fetch any http or https URL.
Parameters
- $url : string
Return values
bool —canFetchURL()
Return whether a URL can be fetched. Returns false if the URL scheme is not allowed or is not supported by this fetcher implementation; returns true otherwise.
public
canFetchURL(string $url) : bool
Parameters
- $url : string
Return values
bool —get()
Fetches the specified URL using optional extra headers and returns the server's response.
public
get(string $url[, array<string|int, mixed> $headers = null ]) : Auth_Yadis_HTTPResponse|null
Parameters
- $url : string
-
The URL to be fetched.
- $headers : array<string|int, mixed> = null
Return values
Auth_Yadis_HTTPResponse|null —isHTTPS()
Is this an https URL?
public
isHTTPS(string $url) : bool
Parameters
- $url : string
Tags
Return values
bool —supportsSSL()
Does this fetcher implementation (and runtime) support fetching HTTPS URLs? May inspect the runtime environment.
public
supportsSSL() : bool
Return values
bool —$support True if this fetcher supports HTTPS fetching; false if not.
URLHasAllowedScheme()
Is this an http or https URL?
public
URLHasAllowedScheme(string $url) : bool
Parameters
- $url : string