PHP 클래스 GuzzleHttp\Handler\MockHandler

상속: implements Countable
파일 보기 프로젝트 열기: guzzle/guzzle 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( array $queue = null, callable $onFulfilled = null, callable $onRejected = null ) The passed in value must be an array of {@see Psr7\Http\Message\ResponseInterface} objects, Exceptions, callables, or Promises.
__invoke ( Psr\Http\Message\RequestInterface $request, array $options )
append ( ) Adds one or more variadic requests, exceptions, callables, or promises to the queue.
count ( ) : integer Returns the number of remaining items in the queue.
createWithMiddleware ( array $queue = null, callable $onFulfilled = null, callable $onRejected = null ) : GuzzleHttp\HandlerStack Creates a new MockHandler that uses the default handler stack list of middlewares.
getLastOptions ( ) : array Get the last received request options.
getLastRequest ( ) : Psr\Http\Message\RequestInterface Get the last received request.

비공개 메소드들

메소드 설명
invokeStats ( Psr\Http\Message\RequestInterface $request, array $options, Psr\Http\Message\ResponseInterface $response = null, $reason = null )

메소드 상세

__construct() 공개 메소드

The passed in value must be an array of {@see Psr7\Http\Message\ResponseInterface} objects, Exceptions, callables, or Promises.
public __construct ( array $queue = null, callable $onFulfilled = null, callable $onRejected = null )
$queue array
$onFulfilled callable Callback to invoke when the return value is fulfilled.
$onRejected callable Callback to invoke when the return value is rejected.

__invoke() 공개 메소드

public __invoke ( Psr\Http\Message\RequestInterface $request, array $options )
$request Psr\Http\Message\RequestInterface
$options array

append() 공개 메소드

Adds one or more variadic requests, exceptions, callables, or promises to the queue.
public append ( )

count() 공개 메소드

Returns the number of remaining items in the queue.
public count ( ) : integer
리턴 integer

createWithMiddleware() 공개 정적인 메소드

Creates a new MockHandler that uses the default handler stack list of middlewares.
public static createWithMiddleware ( array $queue = null, callable $onFulfilled = null, callable $onRejected = null ) : GuzzleHttp\HandlerStack
$queue array Array of responses, callables, or exceptions.
$onFulfilled callable Callback to invoke when the return value is fulfilled.
$onRejected callable Callback to invoke when the return value is rejected.
리턴 GuzzleHttp\HandlerStack

getLastOptions() 공개 메소드

Get the last received request options.
public getLastOptions ( ) : array
리턴 array

getLastRequest() 공개 메소드

Get the last received request.
public getLastRequest ( ) : Psr\Http\Message\RequestInterface
리턴 Psr\Http\Message\RequestInterface