class Cached extends Client

Properties

bool $sslVerifyPeer from  Client
int $timeout from  Client
Client $client
string $cacheDir

Methods

string|bool
get(string $url, array $options = [])

Execute a GET request and return the response's body

string|bool
post(string $url, array $options = [], string $body = '')

Execute a POST request and return the response's body

__construct(Client $client)

No description

string
getCachedFilepath(array $vars)

Generate and return a filepath that matches given vars

string
getCacheKey(array $vars)

Generate a key for a given set of values

getClient()

Return cached client configured with this client's options

Details

at line 37
string|bool get(string $url, array $options = [])

Execute a GET request and return the response's body

Parameters

string $url

Request URL

array $options

Request options

Return Value

string|bool

Response content or FALSE

at line 57
string|bool post(string $url, array $options = [], string $body = '')

Execute a POST request and return the response's body

Parameters

string $url

Request URL

array $options

Request options

string $body

Request body

Return Value

string|bool

Response content or FALSE

at line 27
__construct(Client $client)

No description

Parameters

Client $client

at line 68
protected string getCachedFilepath(array $vars)

Generate and return a filepath that matches given vars

Parameters

array $vars

Return Value

string

at line 91
protected string getCacheKey(array $vars)

Generate a key for a given set of values

Parameters

array $vars

Return Value

string

at line 101
protected Client getClient()

Return cached client configured with this client's options

Return Value

Client