getHandlerContext() public method

The contents of this array will vary depending on which handler you are using. It may also be just an empty array. Relying on this data will couple you to a specific handler, but can give more debug information when needed.
public getHandlerContext ( ) : array
return array
コード例 #1
0
 public function testCanProvideHandlerContext()
 {
     $r = new Request('GET', 'http://www.oo.com');
     $e = new RequestException('foo', $r, null, null, ['bar' => 'baz']);
     $this->assertEquals(['bar' => 'baz'], $e->getHandlerContext());
 }
コード例 #2
0
ファイル: RequestException.php プロジェクト: keika299/chap
 public function __construct(\GuzzleHttp\Exception\RequestException $exception)
 {
     parent::__construct($exception->getMessage(), $exception->getRequest(), $exception->getResponse(), $exception->getPrevious(), $exception->getHandlerContext());
 }