Open Journal Systems  3.3.0
ErrorResponseMock.php
1 <?php
2 
3 namespace Guzzle\Tests\Mock;
4 
8 
9 class ErrorResponseMock extends \Exception implements ErrorResponseExceptionInterface
10 {
11  public $command;
12  public $response;
13 
15  {
16  return new self($command, $response);
17  }
18 
19  public function __construct($command, $response)
20  {
21  $this->command = $command;
22  $this->response = $response;
23  $this->message = 'Error from ' . $response;
24  }
25 }
Guzzle\Plugin\ErrorResponse\ErrorResponseExceptionInterface
Definition: ErrorResponseExceptionInterface.php:11
Guzzle\Tests\Mock\ErrorResponseMock\$command
$command
Definition: ErrorResponseMock.php:11
Guzzle\Tests\Mock\ErrorResponseMock\__construct
__construct($command, $response)
Definition: ErrorResponseMock.php:19
Guzzle\Http\Message\Response
Definition: lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php:17
Guzzle\Service\Command\CommandInterface
Definition: CommandInterface.php:17
Guzzle\Tests\Mock
Definition: CustomResponseModel.php:3
Guzzle\Tests\Mock\ErrorResponseMock\$response
$response
Definition: ErrorResponseMock.php:12
Guzzle\Tests\Mock\ErrorResponseMock
Definition: ErrorResponseMock.php:9
Guzzle\Tests\Mock\ErrorResponseMock\fromCommand
static fromCommand(CommandInterface $command, Response $response)
Definition: ErrorResponseMock.php:14