Source for file Handler.class.php

Documentation is available at Handler.class.php

  1. <?php
  2. /**
  3.  * Gumbo Library Framework
  4.  *
  5.  * LICENSE
  6.  * This library is being released under the terms of the New BSD License.  A
  7.  * copy of the license is packaged with the software (LICENSE.txt).  If no
  8.  * copy is found, a copy of the license template can be found at:
  9.  * http://www.opensource.org/licenses/bsd-license.php
  10.  * 
  11.  * @category Gumbo
  12.  * @package Error
  13.  * @copyright Copyright (c) 2007, iBayou, Michael Luster
  14.  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
  15.  * @author Michael Luster <mluster79@yahoo.com>
  16.  * @link http://sourceforge.net/projects/phpgumbo
  17.  * @version 0.0.1
  18.  */
  19.  
  20. /**
  21.  * Error Handler Interface
  22.  * 
  23.  * The Error Handler contains a static method for processing Exceptions
  24.  * triggered by the program.  This method should be called when an Error
  25.  * occurs.  It will process the Exception and send it to the Error class.
  26.  * The trigger method contains implementation for processing Exceptions and
  27.  * processing input from the trigger_error() call.  This makes this class
  28.  * backwards compatible with PHP4.  The Handler should be activated, which
  29.  * will register it's trigger() method as the exception and error handler.
  30.  *
  31.  * @category Gumbo
  32.  * @package Error
  33.  * @copyright Copyright (c) 2007, iBayou, Michael Luster
  34.  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
  35.  * @author Michael Luster <mluster79@yahoo.com>
  36.  * @link http://sourceforge.net/projects/phpgumbo
  37.  * @desc Error Handler Interface
  38.  * @version 0.0.1
  39.  */
  40.  
  41.     
  42.     /**
  43.      * Catches an Error triggered by the program
  44.      * @param int|Exception$errno Error code (trigger_error), Exception object
  45.      * @param string $errstr Error message, Exception class name
  46.      * @param string $errfile location of Error occurence
  47.      * @param int $errline line number Error occured
  48.      * @param string $errfunc function or class::method where error occured
  49.      */
  50.     public static function trigger ($errno$errstr=null$errfile=null$errline=null$errfunc=null);
  51.     
  52.     
  53.     
  54.     /**
  55.      * Activates this class as the system Error Handler to the trigger method
  56.      */
  57.     public static function activate ();
  58.     
  59.     /**
  60.      * Restores the system Error Handlers
  61.      * @postcondition restore_error_handler ()
  62.      * @postcondition restore_exception_handler ()
  63.      */
  64.     public static function reset ();
  65.     
  66. }
  67.  
  68. ?>