Source of file Error.php
Size: 0,827 Bytes - Last Modified: 2017-11-08T13:54:24+00:00
/home/travis/build/bluzphp/framework/src/Application/Helper/Error.php
123456789101112131415161718192021222324252627282930313233343536373839 | <?php /** * Bluz Framework Component * * @copyright Bluz PHP Team * @link https://github.com/bluzphp/framework */ declare(strict_types=1); namespace Bluz\Application\Helper; use Bluz\Application\Application; use Bluz\Controller\Controller; use Bluz\Proxy\Response; use Bluz\Proxy\Router; /** * Reload helper can be declared inside Bootstrap * * @param \Exception $exception * * @return Controller */ return function ($exception) { /** * @var Application $this */ Response::removeHeaders(); Response::clearBody(); $module = Router::getErrorModule(); $controller = Router::getErrorController(); $params = ['code' => $exception->getCode(), 'exception' => $exception]; return $this->dispatch($module, $controller, $params); }; |