| 1 | <?php |
||
| 21 | class UploadRoutesLoader extends RoutesLoader |
||
| 22 | { |
||
| 23 | public function supports($resource, $type = null) |
||
| 27 | |||
| 28 | protected function register($file, array $config) |
||
| 29 | { |
||
| 30 | $this->routes->add( |
||
| 31 | $config['api_name'], |
||
| 32 | new Route( |
||
| 33 | $config['api_path'], |
||
| 34 | [ |
||
| 35 | '_controller' => $this->action($config), |
||
| 36 | 'fileClass' => $file, |
||
| 37 | ], |
||
| 38 | [], |
||
| 39 | [], |
||
| 40 | '', |
||
| 41 | [], |
||
| 42 | ['POST'] |
||
| 43 | ) |
||
| 44 | ); |
||
| 45 | } |
||
| 46 | |||
| 47 | private function action(array $config) |
||
| 51 | |||
| 52 | private function controller($uploadStrategy) |
||
| 62 | } |
||
| 63 |