1 | <?php |
||
23 | class Standard |
||
24 | extends \Aimeos\Client\JsonApi\Base |
||
25 | implements \Aimeos\Client\JsonApi\Iface |
||
26 | { |
||
27 | private $controller; |
||
28 | |||
29 | |||
30 | /** |
||
31 | * Initializes the client |
||
32 | * |
||
33 | * @param \Aimeos\MShop\Context\Item\Iface $context MShop context object |
||
34 | * @param \Aimeos\MW\View\Iface $view View object |
||
35 | * @param array $templatePaths List of file system paths where the templates are stored |
||
36 | * @param string $path Name of the client, e.g "basket/coupon" |
||
37 | */ |
||
38 | public function __construct( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MW\View\Iface $view, array $templatePaths, $path ) |
||
44 | |||
45 | |||
46 | /** |
||
47 | * Deletes the resource or the resource list |
||
48 | * |
||
49 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
50 | * @param \Psr\Http\Message\ResponseInterface $response Response object |
||
51 | * @return \Psr\Http\Message\ResponseInterface Modified response object |
||
52 | */ |
||
53 | public function delete( ServerRequestInterface $request, ResponseInterface $response ) |
||
104 | |||
105 | |||
106 | /** |
||
107 | * Creates or updates the resource or the resource list |
||
108 | * |
||
109 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
110 | * @param \Psr\Http\Message\ResponseInterface $response Response object |
||
111 | * @return \Psr\Http\Message\ResponseInterface Modified response object |
||
112 | */ |
||
113 | public function post( ServerRequestInterface $request, ResponseInterface $response ) |
||
156 | |||
157 | |||
158 | /** |
||
159 | * Returns the available REST verbs and the available parameters |
||
160 | * |
||
161 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
162 | * @param \Psr\Http\Message\ResponseInterface $response Response object |
||
163 | * @param string|null $prefix Form parameter prefix when nesting parameters is required |
||
164 | * @return \Psr\Http\Message\ResponseInterface Modified response object |
||
165 | */ |
||
166 | public function options( ServerRequestInterface $request, ResponseInterface $response, $prefix = null ) |
||
170 | |||
171 | |||
172 | /** |
||
173 | * Returns the response object with the rendered header and body |
||
174 | * |
||
175 | * @param \Psr\Http\Message\ResponseInterface $response Response object |
||
176 | * @param \Aimeos\MW\View\Iface $view View instance |
||
177 | * @param integer $status HTTP status code |
||
178 | * @return \Psr\Http\Message\ResponseInterface Modified response object |
||
179 | */ |
||
180 | protected function render( ResponseInterface $response, \Aimeos\MW\View\Iface $view, $status ) |
||
192 | } |
||
193 |