Open Journal Systems
3.3.0
ClosureCommand.php
1
<?php
2
3
namespace
Guzzle\Service\Command
;
4
5
use
Guzzle\Common\Exception\InvalidArgumentException
;
6
use
Guzzle\Common\Exception\UnexpectedValueException
;
7
use
Guzzle\Http\Message\RequestInterface
;
8
14
class
ClosureCommand
extends
AbstractCommand
15
{
20
protected
function
init
()
21
{
22
if
(!$this[
'closure'
]) {
23
throw
new
InvalidArgumentException
(
'A closure must be passed in the parameters array'
);
24
}
25
}
26
31
protected
function
build
()
32
{
33
$closure = $this[
'closure'
];
35
$this->request = $closure($this, $this->operation);
36
37
if
(!$this->request || !$this->request instanceof
RequestInterface
) {
38
throw
new
UnexpectedValueException
(
'Closure command did not return a RequestInterface object'
);
39
}
40
}
41
}
Guzzle\Service\Command\ClosureCommand\build
build()
Definition:
ClosureCommand.php:31
Guzzle\Http\Message\RequestInterface
Definition:
lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/RequestInterface.php:16
Guzzle\Service\Command
Definition:
AbstractCommand.php:3
Guzzle\Service\Command\ClosureCommand\init
init()
Definition:
ClosureCommand.php:20
Guzzle\Common\Exception\UnexpectedValueException
Definition:
lib/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/UnexpectedValueException.php:5
Guzzle\Service\Command\ClosureCommand
Definition:
ClosureCommand.php:14
Guzzle\Common\Exception\InvalidArgumentException
Definition:
lib/vendor/guzzle/guzzle/src/Guzzle/Common/Exception/InvalidArgumentException.php:5
Guzzle\Service\Command\AbstractCommand
Definition:
AbstractCommand.php:21
plugins
paymethod
paypal
lib
vendor
guzzle
guzzle
src
Guzzle
Service
Command
ClosureCommand.php
Generated on Fri Aug 28 2020 14:51:07 for Open Journal Systems by
1.8.17