pclib  2.3.2
Lightweight PHP framework
Public Member Functions | Data Fields
ErrorHandler Class Reference

Catch errors and exceptions and show improved error messages. More...

Inheritance diagram for ErrorHandler:
BaseObject

Public Member Functions

 register ()
 Register ErrorHandler.
 
 unregister ()
 Unregister ErrorHandler.
 
 _onException ($e)
 Callback for exception handling.
 
 _onError ($code, $message, $file, $line, $context=null)
 Callback for error handling.
 
 _onWarning ($e)
 Callback for warning handling.
 
 displayError ($e)
 Display error in development mode (with stack trace).
 
 displayProductionError ($e)
 Display error in production mode (uses template).
 
- Public Member Functions inherited from BaseObject
 loadDefaults ($className=null)
 Load default parameters of class $className into object instance.
 
 setProperties (array $defaults)
 Set public properties of object from the array. More...
 
 addEvent ($name, $callback)
 Add event handler to $object->$name property. More...
 
 toArray ()
 Convert object to array. More...
 

Data Fields

 $options = array()
 var array [log, display, develop, error_reporting, template]
 
 $onException
 Occurs before Exception handling. More...
 
 $logger
 var Logger
 
 $debugger
 var Debugger
 
- Data Fields inherited from BaseObject
 $onNewInstance
 Occurs when new instance of the class is created. More...
 
 $onMissingMethod
 Occurs when called method does not exist. More...
 
 $serviceLocator
 var function() Return service object when requested with service(). More...
 

Additional Inherited Members

- Static Public Member Functions inherited from BaseObject
static defaults ()
 Set or retireve default parameters of the object. More...
 
- Protected Member Functions inherited from BaseObject
 fireEvent ($name, array $args=array())
 Run all event handlers in $object->$name property. More...
 
 service ($service, $default=null)
 Try acquire $service and load it into property $this->$service. More...
 

Detailed Description

Catch errors and exceptions and show improved error messages.

You can configure behavior of $app->errorHandler with pclib.errors config parameter. Features:

Field Documentation

$onException

Occurs before Exception handling.


The documentation for this class was generated from the following file: