public function __construct(\Request $request, \Http\ErrorResponse $response)
 {
     $json = array();
     $json['url'] = $request->getUrl();
     $json['method'] = $request->getMethod();
     $json['module'] = $request->getModule();
     $json['code'] = $response->getCode();
     $json['phrase'] = $response->getPhrase();
     $json['backtrace'] = $response->getBacktrace();
     $json['exception'] = $response->getException();
     if (is_a($json['exception'], '\\Exception')) {
         $json['exception_code'] = $response->getException()->getCode();
         $json['exception_file'] = $response->getException()->getFile();
         $json['exception_line'] = $response->getException()->getLine();
         $json['exception_message'] = $response->getException()->getMessage();
     }
     parent::__construct(array('error' => $json));
 }
Beispiel #2
0
 /**
  * Constructor.
  *
  * @param RequestInterface $request       Shared instance of the Request class
  * @param Response         $response      Shared instance of the Response class
  * @param Configuration    $configuration Shared instance of to the Configuration class
  */
 public function __construct($request, $response, $configuration)
 {
     parent::__construct($request, $response, $configuration);
 }
 /**
  * Constructor
  *
  * @param Controller $controller
  */
 public function __construct(Controller $controller = null)
 {
     parent::__construct($controller);
     $this->dtResponse = $this->viewVars['dataTableData'];
 }