PHP 클래스 FakeGuzzleClient, php-gds

상속: implements GuzzleHttp\ClientInterface
파일 보기 프로젝트 열기: tomwalder/php-gds 1 사용 예제들

공개 메소드들

메소드 설명
__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.

메소드 상세

__construct() 공개 메소드

public __construct ( $obj_response = null )

getConfig() 공개 메소드

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.
리턴 mixed

getPostedParams() 공개 메소드

public getPostedParams ( )

getPostedUrl() 공개 메소드

public getPostedUrl ( )

post() 공개 메소드

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

request() 공개 메소드

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.
리턴 Psr\Http\Message\ResponseInterface

requestAsync() 공개 메소드

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.
리턴 GuzzleHttp\Promise\PromiseInterface

send() 공개 메소드

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.
리턴 Psr\Http\Message\ResponseInterface

sendAsync() 공개 메소드

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.
리턴 GuzzleHttp\Promise\PromiseInterface