1 | <?php |
||
23 | abstract class Base |
||
24 | extends \Aimeos\Admin\JsonAdm\Base |
||
25 | implements \Aimeos\Admin\JsonAdm\Common\Decorator\Iface |
||
26 | { |
||
27 | private $client; |
||
28 | |||
29 | |||
30 | /** |
||
31 | * Initializes the client decorator. |
||
32 | * |
||
33 | * @param \Aimeos\Admin\JsonAdm\Iface $client Client object |
||
34 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects |
||
35 | * @param \Aimeos\MW\View\Iface $view View object |
||
36 | * @param array $templatePaths List of file system paths where the templates are stored |
||
37 | * @param string $path Name of the client separated by slashes, e.g "product/property" |
||
38 | */ |
||
39 | public function __construct( \Aimeos\Admin\JsonAdm\Iface $client, |
||
46 | |||
47 | |||
48 | /** |
||
49 | * Passes unknown methods to wrapped objects |
||
50 | * |
||
51 | * @param string $name Name of the method |
||
52 | * @param array $param List of method parameter |
||
53 | * @return mixed Returns the value of the called method |
||
54 | * @throws \Aimeos\Admin\JsonAdm\Exception If method call failed |
||
55 | */ |
||
56 | public function __call( $name, array $param ) |
||
60 | |||
61 | |||
62 | /** |
||
63 | * Deletes the resource or the resource list |
||
64 | * |
||
65 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
66 | * @param \Psr\Http\Message\ResponseInterface $response Response object |
||
67 | * @return \Psr\Http\Message\ResponseInterface Modified response object |
||
68 | */ |
||
69 | public function delete( ServerRequestInterface $request, ResponseInterface $response ) |
||
73 | |||
74 | |||
75 | /** |
||
76 | * Returns the requested resource or the resource list |
||
77 | * |
||
78 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
79 | * @param \Psr\Http\Message\ResponseInterface $response Response object |
||
80 | * @return \Psr\Http\Message\ResponseInterface Modified response object |
||
81 | */ |
||
82 | public function get( ServerRequestInterface $request, ResponseInterface $response ) |
||
86 | |||
87 | |||
88 | |||
89 | /** |
||
90 | * Updates the resource or the resource list partitially |
||
91 | * |
||
92 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
93 | * @param \Psr\Http\Message\ResponseInterface $response Response object |
||
94 | * @return \Psr\Http\Message\ResponseInterface Modified response object |
||
95 | */ |
||
96 | public function patch( ServerRequestInterface $request, ResponseInterface $response ) |
||
100 | |||
101 | |||
102 | |||
103 | /** |
||
104 | * Creates or updates the resource or the resource list |
||
105 | * |
||
106 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
107 | * @param \Psr\Http\Message\ResponseInterface $response Response object |
||
108 | * @return \Psr\Http\Message\ResponseInterface Modified response object |
||
109 | */ |
||
110 | public function post( ServerRequestInterface $request, ResponseInterface $response ) |
||
114 | |||
115 | |||
116 | |||
117 | /** |
||
118 | * Creates or updates the resource or the resource list |
||
119 | * |
||
120 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
121 | * @param \Psr\Http\Message\ResponseInterface $response Response object |
||
122 | * @return \Psr\Http\Message\ResponseInterface Modified response object |
||
123 | */ |
||
124 | public function put( ServerRequestInterface $request, ResponseInterface $response ) |
||
128 | |||
129 | |||
130 | |||
131 | /** |
||
132 | * Returns the available REST verbs |
||
133 | * |
||
134 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
135 | * @param \Psr\Http\Message\ResponseInterface $response Response object |
||
136 | * @param string|null $prefix Form parameter prefix when nesting parameters is required |
||
137 | * @return \Psr\Http\Message\ResponseInterface Modified response object |
||
138 | */ |
||
139 | public function options( ServerRequestInterface $request, ResponseInterface $response, $prefix = null ) |
||
143 | |||
144 | |||
145 | /** |
||
146 | * Returns the underlying admin client object; |
||
147 | * |
||
148 | * @return \Aimeos\Admin\JsonAdm\Iface Admin client object |
||
149 | */ |
||
150 | protected function getClient() |
||
154 | } |
||
155 |