1 | <?php |
||
23 | abstract class Base |
||
24 | extends \Aimeos\Client\JsonApi\Base |
||
25 | implements \Aimeos\Client\JsonApi\Common\Decorator\Iface |
||
26 | { |
||
27 | private $client; |
||
28 | |||
29 | |||
30 | /** |
||
31 | * Initializes the client decorator. |
||
32 | * |
||
33 | * @param \Aimeos\Client\JsonApi\Iface $client Client object |
||
34 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects |
||
35 | * @param string $path Name of the client, e.g "product" |
||
36 | */ |
||
37 | public function __construct( \Aimeos\Client\JsonApi\Iface $client, |
||
44 | |||
45 | |||
46 | /** |
||
47 | * Passes unknown methods to wrapped objects |
||
48 | * |
||
49 | * @param string $name Name of the method |
||
50 | * @param array $param List of method parameter |
||
51 | * @return mixed Returns the value of the called method |
||
52 | * @throws \Aimeos\Client\JsonApi\Exception If method call failed |
||
53 | */ |
||
54 | public function __call( $name, array $param ) |
||
58 | |||
59 | |||
60 | /** |
||
61 | * Deletes the resource or the resource list |
||
62 | * |
||
63 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
64 | * @param \Psr\Http\Message\ResponseInterface $response Response object |
||
65 | * @return \Psr\Http\Message\ResponseInterface Modified response object |
||
66 | */ |
||
67 | public function delete( ServerRequestInterface $request, ResponseInterface $response ) |
||
71 | |||
72 | |||
73 | /** |
||
74 | * Returns the requested resource or the resource list |
||
75 | * |
||
76 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
77 | * @param \Psr\Http\Message\ResponseInterface $response Response object |
||
78 | * @return \Psr\Http\Message\ResponseInterface Modified response object |
||
79 | */ |
||
80 | public function get( ServerRequestInterface $request, ResponseInterface $response ) |
||
84 | |||
85 | |||
86 | |||
87 | /** |
||
88 | * Updates the resource or the resource list partitially |
||
89 | * |
||
90 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
91 | * @param \Psr\Http\Message\ResponseInterface $response Response object |
||
92 | * @return \Psr\Http\Message\ResponseInterface Modified response object |
||
93 | */ |
||
94 | public function patch( ServerRequestInterface $request, ResponseInterface $response ) |
||
98 | |||
99 | |||
100 | |||
101 | /** |
||
102 | * Creates or updates the resource or the resource list |
||
103 | * |
||
104 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
105 | * @param \Psr\Http\Message\ResponseInterface $response Response object |
||
106 | * @return \Psr\Http\Message\ResponseInterface Modified response object |
||
107 | */ |
||
108 | public function post( ServerRequestInterface $request, ResponseInterface $response ) |
||
112 | |||
113 | |||
114 | |||
115 | /** |
||
116 | * Creates or updates the resource or the resource list |
||
117 | * |
||
118 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
119 | * @param \Psr\Http\Message\ResponseInterface $response Response object |
||
120 | * @return \Psr\Http\Message\ResponseInterface Modified response object |
||
121 | */ |
||
122 | public function put( ServerRequestInterface $request, ResponseInterface $response ) |
||
126 | |||
127 | |||
128 | |||
129 | /** |
||
130 | * Returns the available REST verbs |
||
131 | * |
||
132 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
133 | * @param \Psr\Http\Message\ResponseInterface $response Response object |
||
134 | * @return \Psr\Http\Message\ResponseInterface Modified response object |
||
135 | */ |
||
136 | public function options( ServerRequestInterface $request, ResponseInterface $response ) |
||
140 | |||
141 | |||
142 | /** |
||
143 | * Returns the view object that will generate the admin output. |
||
144 | * |
||
145 | * @return \Aimeos\MW\View\Iface The view object which generates the admin output |
||
146 | */ |
||
147 | public function getView() |
||
151 | |||
152 | |||
153 | /** |
||
154 | * Sets the view object that will generate the admin output. |
||
155 | * |
||
156 | * @param \Aimeos\MW\View\Iface $view The view object which generates the admin output |
||
157 | * @return \Aimeos\Admin\JQAdm\Iface Reference to this object for fluent calls |
||
|
|||
158 | */ |
||
159 | public function setView( \Aimeos\MW\View\Iface $view ) |
||
166 | |||
167 | |||
168 | /** |
||
169 | * Returns the underlying client object; |
||
170 | * |
||
171 | * @return \Aimeos\Client\JsonApi\Iface Client object |
||
172 | */ |
||
173 | protected function getClient() |
||
177 | } |
||
178 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.