1 | <?php |
||
22 | trait PayloadBehaviour |
||
23 | { |
||
24 | /** |
||
25 | * @var mixed[] |
||
26 | */ |
||
27 | protected $payload = []; |
||
28 | |||
29 | /** |
||
30 | * Set payload. |
||
31 | * |
||
32 | * @param array<string, mixed> $parameters |
||
33 | */ |
||
34 | final protected function setPayload(array $parameters): void |
||
42 | |||
43 | /** |
||
44 | * Set payload attribute. |
||
45 | * |
||
46 | * @param string $parameter |
||
47 | * @param mixed $value |
||
48 | */ |
||
49 | final protected function setPayloadParameter(string $parameter, $value): void |
||
53 | |||
54 | /** |
||
55 | * Check parameter existence. |
||
56 | * |
||
57 | * @param string $parameter |
||
58 | * |
||
59 | * @return bool |
||
60 | */ |
||
61 | final public function has(string $parameter): bool |
||
65 | |||
66 | /** |
||
67 | * Get parameter. |
||
68 | * |
||
69 | * @param string $parameter |
||
70 | * |
||
71 | * @throws InvalidParameterException |
||
72 | * |
||
73 | * @return mixed |
||
74 | */ |
||
75 | final public function get(string $parameter) |
||
94 | |||
95 | /** |
||
96 | * Export payload. |
||
97 | * |
||
98 | * @return array<string, mixed> |
||
|
|||
99 | */ |
||
100 | final public function getPayload(): array |
||
110 | |||
111 | /** |
||
112 | * Get parameter transformer getter method name. |
||
113 | * |
||
114 | * @param string $parameter |
||
115 | * |
||
116 | * @return string |
||
117 | */ |
||
118 | protected function getParameterTransformerMethod(string $parameter): string |
||
122 | |||
123 | /** |
||
124 | * Magic getters call. |
||
125 | * |
||
126 | * @param string $methodName |
||
127 | * @param mixed[] $arguments |
||
128 | * |
||
129 | * @throws InvalidMethodCallException |
||
130 | * @throws InvalidParameterException |
||
131 | * |
||
132 | * @return mixed |
||
133 | */ |
||
134 | final public function __call(string $methodName, array $arguments) |
||
157 | } |
||
158 |
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.