/**
  *
  * Construct
  *
  * @param Request $request Aura.Request object
  *
  * @param Response $response Aura.Response object
  *
  * @param Router $router Aura.Router object
  *
  * @return null
  *
  */
 public function __construct(Request $request, Response $response, Router $router)
 {
     $this->request = $request;
     // Request object injected by Aura\Di
     $this->response = $response;
     // Response object injected by Aura\Di
     $this->router = $router;
     // Router object injected by Aura\Di
     $this->rest = new Rest($this->request);
     // Rest Object
     $this->params = $this->request->params;
     // $this->rest->setMimeContentType('application/json');
     if (in_array(strtolower($this->request->method->get()), $this->rest->getVerbs())) {
         // TODO ce bloc detecte une methode qui n'existe pas mais a cause du invoke method declenche 2 executions : trouver autre chose
         try {
             // we invoke no method (null) the normal action is triggered and so we get the Exception
             $this->invokeMethod($this, null, $this->params);
         } catch (\Aura\Dispatcher\Exception\MethodNotDefined $exception) {
             // in case the method is not implemented, we invoke the missingMethod() failover method
             $this->invokeMethod($this, 'missingMethod', []);
         }
     }
 }