Open Journal Systems
3.3.0
ErrorResponseMock.php
1
<?php
2
3
namespace
Guzzle\Tests\Mock
;
4
5
use
Guzzle\Plugin\ErrorResponse\ErrorResponseExceptionInterface
;
6
use
Guzzle\Service\Command\CommandInterface
;
7
use
Guzzle\Http\Message\Response
;
8
9
class
ErrorResponseMock
extends
\Exception implements
ErrorResponseExceptionInterface
10
{
11
public
$command
;
12
public
$response
;
13
14
public
static
function
fromCommand
(
CommandInterface
$command
,
Response
$response
)
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
plugins
paymethod
paypal
lib
vendor
guzzle
guzzle
tests
Guzzle
Tests
Mock
ErrorResponseMock.php
Generated on Fri Aug 28 2020 14:51:38 for Open Journal Systems by
1.8.17