@@ -24,6 +24,9 @@ discard block |
||
| 24 | 24 | } |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | + /** |
|
| 28 | + * @param string $param |
|
| 29 | + */ |
|
| 27 | 30 | private function getParamFromArrayIfSet($array, $param, $default = null) |
| 28 | 31 | { |
| 29 | 32 | if(isset($array[$param])) |
@@ -52,6 +55,9 @@ discard block |
||
| 52 | 55 | return $response; |
| 53 | 56 | } |
| 54 | 57 | |
| 58 | + /** |
|
| 59 | + * @param string $serializer |
|
| 60 | + */ |
|
| 55 | 61 | protected function reserializeBody($response, $serializer) |
| 56 | 62 | { |
| 57 | 63 | $body = $response->getBody(); |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | $settings = array("settings"=>["determineRouteBeforeAppMiddleware"=>true]); |
| 14 | 14 | parent::__construct($settings); |
| 15 | 15 | $c = $this->getContainer(); |
| 16 | - $c['errorHandler'] = function($c) { return new WebErrorHandler();}; |
|
| 16 | + $c['errorHandler'] = function($c) { return new WebErrorHandler(); }; |
|
| 17 | 17 | $this->add(new AuthMiddleware()); |
| 18 | 18 | $this->add(new ODataMiddleware()); |
| 19 | 19 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | public function registerAPI($uri, $api) |
| 27 | 27 | { |
| 28 | - $group = $this->group($uri, function() use($api){$api->setup($this);}); |
|
| 28 | + $group = $this->group($uri, function() use($api){$api->setup($this); }); |
|
| 29 | 29 | $group->add(new \Http\Rest\SerializationMiddleware()); |
| 30 | 30 | $group->add(new \Http\Rest\CORSMiddleware($this->getContainer())); |
| 31 | 31 | } |
@@ -13,7 +13,9 @@ discard block |
||
| 13 | 13 | $settings = array("settings"=>["determineRouteBeforeAppMiddleware"=>true]); |
| 14 | 14 | parent::__construct($settings); |
| 15 | 15 | $c = $this->getContainer(); |
| 16 | - $c['errorHandler'] = function($c) { return new WebErrorHandler();}; |
|
| 16 | + $c['errorHandler'] = function($c) |
|
| 17 | + { |
|
| 18 | +return new WebErrorHandler();}; |
|
| 17 | 19 | $this->add(new AuthMiddleware()); |
| 18 | 20 | $this->add(new ODataMiddleware()); |
| 19 | 21 | } |
@@ -25,7 +27,9 @@ discard block |
||
| 25 | 27 | |
| 26 | 28 | public function registerAPI($uri, $api) |
| 27 | 29 | { |
| 28 | - $group = $this->group($uri, function() use($api){$api->setup($this);}); |
|
| 30 | + $group = $this->group($uri, function() use($api) |
|
| 31 | + { |
|
| 32 | +$api->setup($this);}); |
|
| 29 | 33 | $group->add(new \Http\Rest\SerializationMiddleware()); |
| 30 | 34 | $group->add(new \Http\Rest\CORSMiddleware($this->getContainer())); |
| 31 | 35 | } |