Documentation

StaticClient
in package

FinalYes

Simplified interface to Guzzle that does not require a class to be instantiated

Table of Contents

Properties

$client  : Client

Methods

delete()  : Response
Send a DELETE request
get()  : Response
Send a GET request
head()  : Response
Send a HEAD request
mount()  : mixed
Mount the client to a simpler class name for a specific client
options()  : Response
Send an OPTIONS request
patch()  : Response
Send a PATCH request
post()  : Response
Send a POST request
put()  : Response
Send a PUT request
request()  : Response|Stream

Properties

Methods

delete()

Send a DELETE request

public static delete(string $url[, array<string|int, mixed> $options = array() ]) : Response
Parameters
$url : string

URL of the request

$options : array<string|int, mixed> = array()

Array of request options

Tags
see
Guzzle::request

for a list of available options

Return values
Response

get()

Send a GET request

public static get(string $url[, array<string|int, mixed> $options = array() ]) : Response
Parameters
$url : string

URL of the request

$options : array<string|int, mixed> = array()

Array of request options

Tags
see
Guzzle::request

for a list of available options

Return values
Response

head()

Send a HEAD request

public static head(string $url[, array<string|int, mixed> $options = array() ]) : Response
Parameters
$url : string

URL of the request

$options : array<string|int, mixed> = array()

Array of request options

Tags
see
Guzzle::request

for a list of available options

Return values
Response

mount()

Mount the client to a simpler class name for a specific client

public static mount([string $className = 'Guzzle' ][, ClientInterface $client = null ]) : mixed
Parameters
$className : string = 'Guzzle'

Class name to use to mount

$client : ClientInterface = null

Client used to send requests

options()

Send an OPTIONS request

public static options(string $url[, array<string|int, mixed> $options = array() ]) : Response
Parameters
$url : string

URL of the request

$options : array<string|int, mixed> = array()

Array of request options

Tags
see
Guzzle::request

for a list of available options

Return values
Response

patch()

Send a PATCH request

public static patch(string $url[, array<string|int, mixed> $options = array() ]) : Response
Parameters
$url : string

URL of the request

$options : array<string|int, mixed> = array()

Array of request options

Tags
see
Guzzle::request

for a list of available options

Return values
Response

post()

Send a POST request

public static post(string $url[, array<string|int, mixed> $options = array() ]) : Response
Parameters
$url : string

URL of the request

$options : array<string|int, mixed> = array()

Array of request options

Tags
see
Guzzle::request

for a list of available options

Return values
Response

put()

Send a PUT request

public static put(string $url[, array<string|int, mixed> $options = array() ]) : Response
Parameters
$url : string

URL of the request

$options : array<string|int, mixed> = array()

Array of request options

Tags
see
Guzzle::request

for a list of available options

Return values
Response

request()

public static request(string $method, string $url[, array<string|int, mixed> $options = array() ]) : Response|Stream
Parameters
$method : string

HTTP request method (GET, POST, HEAD, DELETE, PUT, etc)

$url : string

URL of the request

$options : array<string|int, mixed> = array()

Options to use with the request. See: Guzzle\Http\Message\RequestFactory::applyOptions()

Return values
Response|Stream

        
On this page

Search results