PHP Class FakeGuzzleClient, php-gds

Inheritance: implements GuzzleHttp\ClientInterface
Afficher le fichier Open project: tomwalder/php-gds Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( $obj_response = null )
getConfig ( string | null $option = null ) : mixed Get a client configuration option.
getPostedParams ( )
getPostedUrl ( )
post ( $str_url, array $arr_params ) : Response Pretend to do a POST request
request ( string $method, string | Psr\Http\Message\UriInterface $uri, array $options = [] ) : Psr\Http\Message\ResponseInterface Create and send an HTTP request.
requestAsync ( string $method, string | Psr\Http\Message\UriInterface $uri, array $options = [] ) : GuzzleHttp\Promise\PromiseInterface Create and send an asynchronous HTTP request.
send ( Psr\Http\Message\RequestInterface $request, array $options = [] ) : Psr\Http\Message\ResponseInterface Send an HTTP request.
sendAsync ( Psr\Http\Message\RequestInterface $request, array $options = [] ) : GuzzleHttp\Promise\PromiseInterface Asynchronously send an HTTP request.

Method Details

__construct() public méthode

public __construct ( $obj_response = null )

getConfig() public méthode

These options include default request options of the client, a "handler" (if utilized by the concrete client), and a "base_uri" if utilized by the concrete client.
public getConfig ( string | null $option = null ) : mixed
$option string | null The config option to retrieve.
Résultat mixed

getPostedParams() public méthode

public getPostedParams ( )

getPostedUrl() public méthode

public getPostedUrl ( )

post() public méthode

Pretend to do a POST request
public post ( $str_url, array $arr_params ) : Response
$str_url
$arr_params array
Résultat GuzzleHttp\Psr7\Response

request() public méthode

Use an absolute path to override the base path of the client, or a relative path to append to the base path of the client. The URL can contain the query string as well.
public request ( string $method, string | Psr\Http\Message\UriInterface $uri, array $options = [] ) : Psr\Http\Message\ResponseInterface
$method string HTTP method.
$uri string | Psr\Http\Message\UriInterface URI object or string.
$options array Request options to apply.
Résultat Psr\Http\Message\ResponseInterface

requestAsync() public méthode

Use an absolute path to override the base path of the client, or a relative path to append to the base path of the client. The URL can contain the query string as well. Use an array to provide a URL template and additional variables to use in the URL template expansion.
public requestAsync ( string $method, string | Psr\Http\Message\UriInterface $uri, array $options = [] ) : GuzzleHttp\Promise\PromiseInterface
$method string HTTP method
$uri string | Psr\Http\Message\UriInterface URI object or string.
$options array Request options to apply.
Résultat GuzzleHttp\Promise\PromiseInterface

send() public méthode

Send an HTTP request.
public send ( Psr\Http\Message\RequestInterface $request, array $options = [] ) : Psr\Http\Message\ResponseInterface
$request Psr\Http\Message\RequestInterface Request to send
$options array Request options to apply to the given request and to the transfer.
Résultat Psr\Http\Message\ResponseInterface

sendAsync() public méthode

Asynchronously send an HTTP request.
public sendAsync ( Psr\Http\Message\RequestInterface $request, array $options = [] ) : GuzzleHttp\Promise\PromiseInterface
$request Psr\Http\Message\RequestInterface Request to send
$options array Request options to apply to the given request and to the transfer.
Résultat GuzzleHttp\Promise\PromiseInterface