mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
a25be983b8
- Renamed Uri class to Url. - Renamed setUri and getUri to setUrl and getUrl. - Added custom Exceptions and ensured that router only throws HttpExceptions. - Added isAjax method to Request class. - Added better phpDocs. - Other minor optimisations.
14 lines
264 B
PHP
14 lines
264 B
PHP
<?php
|
|
|
|
class ExceptionHandlerFirst implements \Pecee\Handlers\IExceptionHandler
|
|
{
|
|
public function handleError(\Pecee\Http\Request $request, \Exception $error)
|
|
{
|
|
global $stack;
|
|
$stack[] = static::class;
|
|
|
|
$request->setUrl('/');
|
|
return $request;
|
|
}
|
|
|
|
} |