Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes
Error Class Reference

Main error handling class. More...

Public Member Functions

 errorHandler ($errcode, $errstr, $errfile= '', $errline=0, $errvars=array())
 
 exceptionHandler ($e)
 

Static Public Member Functions

static getInstance ($debug_ob=null, $error_settings)
 
static trigger ($errcode, $errstr, $errfile= '', $errline=0)
 
static disable ()
 

Data Fields

 $dev_stage
 
 $code_line_count
 
 $log_errors
 
 $e_error_all
 
 $e_warning_all
 
 $e_notice_all
 
 $e_debug
 
 $e_deprecated_all
 

Static Public Attributes

static $instance = null
 

Detailed Description

Main error handling class.

Version
1.1
Author
DinuSV

Redirects all php errors and exceptions here. Outputs errors only in development stage. Uses Debug object to output errors.

Member Function Documentation

static getInstance (   $debug_ob = null,
  $error_settings 
)
static

Class must be singleton

Parameters
Debug$debug_ob
array$error_settings
Returns
Error : instance of this class
errorHandler (   $errcode,
  $errstr,
  $errfile = '',
  $errline = 0,
  $errvars = array() 
)

The default error handler used by the framework

Parameters
integer$errcode: the level of the error raised
string$errstr: error message
string$errfile: filename that the error was raised in
integer$errline: the line number the error was raised in
array$errvars: points to the active symbol table at the point the error occured
Returns
boolean : always true
exceptionHandler (   $e)

The default exception handler for uncaught exceptions

Parameters
Exception$e
static trigger (   $errcode,
  $errstr,
  $errfile = '',
  $errline = 0 
)
static

Static function to trigger an error. Sends the data to the error handler.

See Also
errorHandler
static disable ( )
static

Restore default php.ini settings possibly affected by this class and return to the default php behavior

Field Documentation

$instance = null
static

Error : Instance of this object

$dev_stage

Stage of the project : development, production

bool : Stage of the project : development / production

$code_line_count

int : Used for reporting code from the source file

$log_errors

booL : Log errors to ini file if true

$e_error_all

int : Contains all errors as bits

$e_warning_all

int : Contains all warnings as binary flags

$e_notice_all

int : Contains all notices as binary flags

$e_debug

int : Contains the debugging value as binary flag

$e_deprecated_all

int : Contains the deprecated value as binary flag