Open Journal Systems  3.3.0
Guzzle\Http\StaticClient Class Reference

Static Public Member Functions

static delete ($url, $options=array())
 
static get ($url, $options=array())
 
static head ($url, $options=array())
 
static mount ($className='Guzzle', ClientInterface $client=null)
 
static options ($url, $options=array())
 
static patch ($url, $options=array())
 
static post ($url, $options=array())
 
static put ($url, $options=array())
 
static request ($method, $url, $options=array())
 

Detailed Description

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

Definition at line 13 of file StaticClient.php.

Member Function Documentation

◆ delete()

static Guzzle\Http\StaticClient::delete (   $url,
  $options = array() 
)
static

Send a DELETE request

Parameters
string$urlURL of the request
array$optionsArray of request options
Returns
\Guzzle\Http\Message\Response
See also
Guzzle::request for a list of available options

Definition at line 97 of file StaticClient.php.

References Guzzle\Http\StaticClient\request().

◆ get()

static Guzzle\Http\StaticClient::get (   $url,
  $options = array() 
)
static

Send a GET request

Parameters
string$urlURL of the request
array$optionsArray of request options
Returns
\Guzzle\Http\Message\Response
See also
Guzzle::request for a list of available options

Definition at line 69 of file StaticClient.php.

References Guzzle\Http\StaticClient\request().

Referenced by Guzzle\Tests\Plugin\Redirect\StaticClientTest\testCanCreateStreamsUsingCustomFactory(), and Guzzle\Tests\Plugin\Redirect\StaticClientTest\testCanCreateStreamsUsingDefaultFactory().

◆ head()

static Guzzle\Http\StaticClient::head (   $url,
  $options = array() 
)
static

Send a HEAD request

Parameters
string$urlURL of the request
array$optionsArray of request options
Returns
\Guzzle\Http\Message\Response
See also
Guzzle::request for a list of available options

Definition at line 83 of file StaticClient.php.

References Guzzle\Http\StaticClient\request().

◆ mount()

static Guzzle\Http\StaticClient::mount (   $className = 'Guzzle',
ClientInterface  $client = null 
)
static

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

Parameters
string$classNameClass name to use to mount
ClientInterface$clientClient used to send requests

Definition at line 24 of file StaticClient.php.

Referenced by Guzzle\Tests\Plugin\Redirect\StaticClientTest\testMountsClient().

◆ options()

static Guzzle\Http\StaticClient::options (   $url,
  $options = array() 
)
static

Send an OPTIONS request

Parameters
string$urlURL of the request
array$optionsArray of request options
Returns
\Guzzle\Http\Message\Response
See also
Guzzle::request for a list of available options

Definition at line 153 of file StaticClient.php.

References Guzzle\Http\StaticClient\request().

◆ patch()

static Guzzle\Http\StaticClient::patch (   $url,
  $options = array() 
)
static

Send a PATCH request

Parameters
string$urlURL of the request
array$optionsArray of request options
Returns
\Guzzle\Http\Message\Response
See also
Guzzle::request for a list of available options

Definition at line 139 of file StaticClient.php.

References Guzzle\Http\StaticClient\request().

◆ post()

static Guzzle\Http\StaticClient::post (   $url,
  $options = array() 
)
static

Send a POST request

Parameters
string$urlURL of the request
array$optionsArray of request options
Returns
\Guzzle\Http\Message\Response
See also
Guzzle::request for a list of available options

Definition at line 111 of file StaticClient.php.

References Guzzle\Http\StaticClient\request().

◆ put()

static Guzzle\Http\StaticClient::put (   $url,
  $options = array() 
)
static

Send a PUT request

Parameters
string$urlURL of the request
array$optionsArray of request options
Returns
\Guzzle\Http\Message\Response
See also
Guzzle::request for a list of available options

Definition at line 125 of file StaticClient.php.

References Guzzle\Http\StaticClient\request().

◆ request()

static Guzzle\Http\StaticClient::request (   $method,
  $url,
  $options = array() 
)
static
Parameters
string$methodHTTP request method (GET, POST, HEAD, DELETE, PUT, etc)
string$urlURL of the request
array$optionsOptions to use with the request. See: Guzzle\Http\Message\RequestFactory::applyOptions()
Returns
\Guzzle\Http\Message\Response|\Guzzle\Stream\Stream

Definition at line 38 of file StaticClient.php.

Referenced by Guzzle\Http\StaticClient\delete(), Guzzle\Http\StaticClient\get(), Guzzle\Http\StaticClient\head(), Guzzle\Http\StaticClient\options(), Guzzle\Http\StaticClient\patch(), Guzzle\Http\StaticClient\post(), and Guzzle\Http\StaticClient\put().


The documentation for this class was generated from the following file: