1 | <?php |
||
16 | class Manager extends ManagerAbstract |
||
17 | { |
||
18 | use PoolTrait; |
||
19 | |||
20 | protected $entity = 'Product'; |
||
21 | |||
22 | protected $maps = [ |
||
23 | 'save' => ['POST', '/products'], |
||
24 | 'findById' => ['GET', '/products/{itemId}'], |
||
25 | 'patch' => ['PATCH', '/products/{itemId}'], |
||
26 | 'update' => ['PUT', '/products/{itemId}'], |
||
27 | 'fetch' => ['GET', '/products?page={offset}&size={limit}'], |
||
28 | ]; |
||
29 | |||
30 | public function save(EntityInterface $product, $route = 'save') |
||
42 | |||
43 | protected function getMap($route, Product $product) |
||
47 | |||
48 | public function commit() |
||
56 | } |
||
57 |