PHP Class Phalcon\Utils\PrettyExceptions

Prints exception/errors backtraces using a pretty visualization
Show file Open project: phalcon/pretty-exceptions Class Usage Examples

Protected Properties

Property Type Description
$_application Reference to the current Phalcon application instance
$_showActive Flag to control that only one exception/error is show at time
$_showApplicationDump Show debug information about the application
$_showBackTrace Print the backtrace
$_showFileFragment Show only the related part of the application
$_showFiles Show the application's code
$_theme CSS theme
$_uri Pretty Exceptions

Public Methods

Method Description
__construct ( Phalcon\Mvc\Application $application = null ) Constructor
getCssSources ( ) : string Returns the css sources
getJsSources ( ) : string Returns the javascript sources
getVersion ( ) Returns the current framework version
handle ( Exception $e, Phalcon\Mvc\Application $application = null ) : boolean Handles exceptions
handleError ( integer $errorCode, string $errorMessage, string $errorFile, integer $errorLine, Phalcon\Mvc\Application $application = null ) Handles errors/warnings/notices
setBaseUri ( string $uri ) Change the base uri for css/javascript sources
setTheme ( string $theme ) Change the CSS theme
showApplicationDump ( boolean $showApplicationDump ) Set to display a dump of the Phalcon application instance
showBackTrace ( boolean $showBackTrace ) Set if the exception/error backtrace must be shown
showFileFragment ( boolean $showFileFragment ) Set if only the file fragment related to the exception must be shown instead of the complete file
showFiles ( boolean $showFiles ) Set if the application's files must be opened an showed as part of the backtrace

Protected Methods

Method Description
_escapeString ( $value )
_getArrayDump ( $argument, $n )
_showTraceItem ( integer $n, array $trace ) Shows a backtrace item
getApplicationDump ( Phalcon\Mvc\Application $application ) Returns human readable dump of the current Phalcon application instance.

Method Details

__construct() public method

Constructor
public __construct ( Phalcon\Mvc\Application $application = null )
$application Phalcon\Mvc\Application OPTIONAL To display a dump of the current state of the Phalcon application instance.

_escapeString() protected method

protected _escapeString ( $value )

_getArrayDump() protected method

protected _getArrayDump ( $argument, $n )

_showTraceItem() protected method

Shows a backtrace item
protected _showTraceItem ( integer $n, array $trace )
$n integer
$trace array

getApplicationDump() protected method

Returns human readable dump of the current Phalcon application instance.
protected getApplicationDump ( Phalcon\Mvc\Application $application )
$application Phalcon\Mvc\Application OPTIONAL To display a dump of the current state of the Phalcon application instance.

getCssSources() public method

Returns the css sources
public getCssSources ( ) : string
return string

getJsSources() public method

Returns the javascript sources
public getJsSources ( ) : string
return string

getVersion() public method

Returns the current framework version
public getVersion ( )

handle() public method

Handles exceptions
public handle ( Exception $e, Phalcon\Mvc\Application $application = null ) : boolean
$e Exception
$application Phalcon\Mvc\Application OPTIONAL To display a dump of the current state of the Phalcon application instance.
return boolean

handleError() public method

Handles errors/warnings/notices
public handleError ( integer $errorCode, string $errorMessage, string $errorFile, integer $errorLine, Phalcon\Mvc\Application $application = null )
$errorCode integer
$errorMessage string
$errorFile string
$errorLine integer
$application Phalcon\Mvc\Application OPTIONAL To display a dump of the current state of the Phalcon application instance.

setBaseUri() public method

Change the base uri for css/javascript sources
public setBaseUri ( string $uri )
$uri string

setTheme() public method

Change the CSS theme
public setTheme ( string $theme )
$theme string

showApplicationDump() public method

Set to display a dump of the Phalcon application instance
public showApplicationDump ( boolean $showApplicationDump )
$showApplicationDump boolean

showBackTrace() public method

Set if the exception/error backtrace must be shown
public showBackTrace ( boolean $showBackTrace )
$showBackTrace boolean

showFileFragment() public method

Set if only the file fragment related to the exception must be shown instead of the complete file
public showFileFragment ( boolean $showFileFragment )
$showFileFragment boolean

showFiles() public method

Set if the application's files must be opened an showed as part of the backtrace
public showFiles ( boolean $showFiles )
$showFiles boolean

Property Details

$_application protected property

Reference to the current Phalcon application instance
protected $_application

$_showActive protected static property

Flag to control that only one exception/error is show at time
protected static $_showActive

$_showApplicationDump protected property

Show debug information about the application
protected $_showApplicationDump

$_showBackTrace protected property

Print the backtrace
protected $_showBackTrace

$_showFileFragment protected property

Show only the related part of the application
protected $_showFileFragment

$_showFiles protected property

Show the application's code
protected $_showFiles

$_theme protected property

CSS theme
protected $_theme

$_uri protected property

Pretty Exceptions
protected $_uri