Auth_Yadis_ParanoidHTTPFetcher
extends Auth_Yadis_HTTPFetcher
in package
A paranoid {@link Auth_Yadis_HTTPFetcher} class which uses CURL for fetching.
Table of Contents
- $timeout : mixed
- $data : mixed
- $headers : mixed
- __construct() : mixed
- _findRedirect() : null|string
- _writeData() : int
- _writeHeader() : int
- 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?
- post() : mixed
- reset() : mixed
- supportsSSL() : bool
- Does this fetcher support SSL URLs?
- URLHasAllowedScheme() : bool
- Is this an http or https URL?
Properties
$timeout
public
mixed
$timeout
= 20
$data
private
mixed
$data
= ''
$headers
private
mixed
$headers
= []
Methods
__construct()
public
__construct() : mixed
Return values
mixed —_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 —_writeData()
public
_writeData(string $ch, string $data) : int
Parameters
- $ch : string
- $data : string
Tags
Return values
int —_writeHeader()
public
_writeHeader(string $ch, string $header) : int
Parameters
- $ch : string
- $header : string
Tags
Return values
int —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
Parameters
- $url : string
- $extra_headers : array<string|int, mixed>|null = 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 —post()
public
post(mixed $url, mixed $body[, mixed $extra_headers = null ]) : mixed
Parameters
- $url : mixed
- $body : mixed
- $extra_headers : mixed = null
Return values
mixed —reset()
public
reset() : mixed
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