1 | <?php |
||
9 | abstract class AbstractLocation implements RequestLocationInterface |
||
10 | { |
||
11 | /** @var string */ |
||
12 | protected $locationName; |
||
13 | |||
14 | /** |
||
15 | * Set the name of the location |
||
16 | * |
||
17 | * @param $locationName |
||
18 | */ |
||
19 | 10 | public function __construct($locationName) |
|
23 | |||
24 | /** |
||
25 | * @param CommandInterface $command |
||
26 | * @param RequestInterface $request |
||
27 | * @param Parameter $param |
||
28 | * @return RequestInterface |
||
29 | */ |
||
30 | public function visit( |
||
37 | |||
38 | /** |
||
39 | * @param CommandInterface $command |
||
40 | * @param RequestInterface $request |
||
41 | * @param Operation $operation |
||
42 | * @return RequestInterface |
||
43 | */ |
||
44 | public function after( |
||
51 | |||
52 | /** |
||
53 | * Prepare (filter and set desired name for request item) the value for |
||
54 | * request. |
||
55 | * |
||
56 | * @param mixed $value |
||
57 | * @param Parameter $param |
||
58 | * |
||
59 | * @return array|mixed |
||
60 | */ |
||
61 | 8 | protected function prepareValue($value, Parameter $param) |
|
67 | |||
68 | /** |
||
69 | * Recursively prepare and filter nested values. |
||
70 | * |
||
71 | * @param array $value Value to map |
||
72 | * @param Parameter $param Parameter related to the current key. |
||
73 | * |
||
74 | * @return array Returns the mapped array |
||
75 | */ |
||
76 | 3 | protected function resolveRecursively(array $value, Parameter $param) |
|
101 | } |
||
102 |