/** * @param Response $response * @return ErrorModel */ public function __invoke(Response $response) { $response->setStatus(404); return $this->model(); }
/** * @param \Exception $exception * @param Response $response * @return Model */ public function __invoke(\Exception $exception, Response $response) { $response->setStatus(500); return $this->model([ExceptionModel::EXCEPTION => $exception]); }
/** * @param Response $response * @return Response */ public function __invoke(Response $response) { $response->setStatus($this->status); return $response; }