PHP Class CI_Exceptions, TastyIgniter

Show file Open project: tastyigniter/tastyigniter Class Usage Examples

Public Properties

Property Type Description
$levels array List of available error levels
$ob_level integer Nesting level of the output buffering mechanism

Public Methods

Method Description
__construct ( ) : void Class constructor
log_exception ( integer $severity, string $message, string $filepath, integer $line ) : void Exception Logger
show_404 ( string $page = '', boolean $log_error = TRUE ) : void 404 Error Handler
show_error ( string $heading, string | string[] $message, string $template = 'error_general', integer $status_code = 500 ) : string General Error Page
show_exception ( $exception ) --------------------------------------------------------------------
show_php_error ( integer $severity, string $message, string $filepath, integer $line ) : string Native PHP error handler

Method Details

__construct() public method

Class constructor
public __construct ( ) : void
return void

log_exception() public method

Logs PHP generated error messages
public log_exception ( integer $severity, string $message, string $filepath, integer $line ) : void
$severity integer Log level
$message string Error message
$filepath string File path
$line integer Line number
return void

show_404() public method

404 Error Handler
public show_404 ( string $page = '', boolean $log_error = TRUE ) : void
$page string Page URI
$log_error boolean Whether to log the error
return void

show_error() public method

Takes an error message as input (either as a string or an array) and displays it using the specified template.
public show_error ( string $heading, string | string[] $message, string $template = 'error_general', integer $status_code = 500 ) : string
$heading string Page heading
$message string | string[] Error message
$template string Template name
$status_code integer (default: 500)
return string Error page output

show_exception() public method

--------------------------------------------------------------------
public show_exception ( $exception )

show_php_error() public method

Native PHP error handler
public show_php_error ( integer $severity, string $message, string $filepath, integer $line ) : string
$severity integer Error level
$message string Error message
$filepath string File path
$line integer Line number
return string Error page output

Property Details

$levels public property

List of available error levels
public array $levels
return array

$ob_level public property

Nesting level of the output buffering mechanism
public int $ob_level
return integer