Auth_Yadis_PlainHTTPFetcher
extends Auth_Yadis_HTTPFetcher
in package
This class implements a plain, hand-built socket-based fetcher which will be used in the event that CURL is unavailable.
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|bool
- Fetches the specified URL using optional extra headers and returns the server's response.
- isHTTPS() : bool
- Is this an https URL?
- post() : mixed
- supportsSSL() : bool
- Does this fetcher support SSL URLs?
- 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>|null $extra_headers = null ]) : Auth_Yadis_HTTPResponse|null|bool
Parameters
- $url : string
- $extra_headers : array<string|int, mixed>|null = null
Return values
Auth_Yadis_HTTPResponse|null|bool —isHTTPS()
Is this an https URL?
public
isHTTPS(string $url) : bool
Parameters
- $url : string
Tags
Return values
bool —post()
public
post(mixed $url, mixed $body[, mixed $extra_headers = null ]) : mixed
Parameters
- $url : mixed
- $body : mixed
- $extra_headers : mixed = null
Return values
mixed —supportsSSL()
Does this fetcher support SSL URLs?
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