PHP Class Bolt\Controller\Exception

Author: Gawain Lynch ([email protected])
Inheritance: extends Base, implements Bolt\Controller\ExceptionControllerInterface
ファイルを表示 Open project: bolt/bolt Class Usage Examples

Public Methods

Method Description
databaseConnect ( string $platform, Exception $previous ) : Response
databaseDriver ( string $subtype, string $name, string $driver, string $parameter = null ) : Response
databasePath ( string $subtype, string $path, string $error ) : Response
genericException ( Exception $exception ) : Response
kernelException ( GetResponseForExceptionEvent $event ) : Response Route for kernel exception handling.
systemCheck ( string $type, array $messages = [], array $context = [] ) : Response System check exceptions.

Protected Methods

Method Description
addRoutes ( Silex\ControllerCollection $c )
getContextArray ( Exception $exception = null ) : array Get a pre-packaged Twig context array.
getSafeArguments ( array $args ) : array Get an array of safe (sanitised) function arguments from a trace entry.
getSafeTrace ( Exception $exception ) : array Get an exception trace that is safe to display publicly.
saveException ( Exception $exception ) Attempt to save the serialised exception if in debug mode.

Method Details

addRoutes() protected method

protected addRoutes ( Silex\ControllerCollection $c )
$c Silex\ControllerCollection

databaseConnect() public method

public databaseConnect ( string $platform, Exception $previous ) : Response
$platform string
$previous Exception
return Symfony\Component\HttpFoundation\Response

databaseDriver() public method

public databaseDriver ( string $subtype, string $name, string $driver, string $parameter = null ) : Response
$subtype string
$name string
$driver string
$parameter string
return Symfony\Component\HttpFoundation\Response

databasePath() public method

public databasePath ( string $subtype, string $path, string $error ) : Response
$subtype string
$path string
$error string
return Symfony\Component\HttpFoundation\Response

genericException() public method

public genericException ( Exception $exception ) : Response
$exception Exception
return Symfony\Component\HttpFoundation\Response

getContextArray() protected method

Get a pre-packaged Twig context array.
protected getContextArray ( Exception $exception = null ) : array
$exception Exception
return array

getSafeArguments() protected method

Get an array of safe (sanitised) function arguments from a trace entry.
protected getSafeArguments ( array $args ) : array
$args array
return array

getSafeTrace() protected method

Get an exception trace that is safe to display publicly.
protected getSafeTrace ( Exception $exception ) : array
$exception Exception
return array

kernelException() public method

Route for kernel exception handling.
public kernelException ( GetResponseForExceptionEvent $event ) : Response
$event Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent
return Symfony\Component\HttpFoundation\Response

saveException() protected method

Attempt to save the serialised exception if in debug mode.
protected saveException ( Exception $exception )
$exception Exception

systemCheck() public method

System check exceptions.
public systemCheck ( string $type, array $messages = [], array $context = [] ) : Response
$type string
$messages array
$context array
return Symfony\Component\HttpFoundation\Response