1 | <?php |
||
8 | trait ParametersTrait |
||
9 | { |
||
10 | /** |
||
11 | * Internal storage of all of the parameters. |
||
12 | * |
||
13 | * @var ParameterBag |
||
14 | */ |
||
15 | protected $parameters; |
||
16 | |||
17 | /** |
||
18 | * Set one parameter. |
||
19 | * |
||
20 | * @param string $key Parameter key |
||
21 | * @param mixed $value Parameter value |
||
22 | * @return $this |
||
23 | */ |
||
24 | 476 | protected function setParameter($key, $value) |
|
30 | |||
31 | /** |
||
32 | * Get one parameter. |
||
33 | * |
||
34 | * @return mixed A single parameter value. |
||
35 | */ |
||
36 | 440 | protected function getParameter($key) |
|
40 | |||
41 | /** |
||
42 | * Get all parameters. |
||
43 | * |
||
44 | * @return array An associative array of parameters. |
||
45 | */ |
||
46 | 27 | public function getParameters() |
|
50 | |||
51 | /** |
||
52 | * Initialize the object with parameters. |
||
53 | * |
||
54 | * If any unknown parameters passed, they will be ignored. |
||
55 | * |
||
56 | * @param array $parameters An associative array of parameters |
||
57 | * @return $this. |
||
|
|||
58 | */ |
||
59 | public function initialize(array $parameters = []) |
||
65 | |||
66 | /** |
||
67 | * Validate the request. |
||
68 | * |
||
69 | * This method is called internally by gateways to avoid wasting time with an API call |
||
70 | * when the request is clearly invalid. |
||
71 | * |
||
72 | * @param string ... a variable length list of required parameters |
||
73 | * @throws InvalidRequestException |
||
74 | */ |
||
75 | 12 | public function validate(...$args) |
|
84 | } |
||
85 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.