StaticClient
in package
Simplified interface to Guzzle that does not require a class to be instantiated
Table of Contents
Properties
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
$client
private
static Client
$client
Guzzle client
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
Return values
Responseget()
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
Return values
Responsehead()
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
Return values
Responsemount()
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
Return values
Responsepatch()
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
Return values
Responsepost()
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
Return values
Responseput()
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
Return values
Responserequest()
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()