From 80c7cb56b32a938c4021b0258fbbbb3f2a8a347a Mon Sep 17 00:00:00 2001 From: Rafal Lindemann Date: Sat, 2 Feb 2013 17:09:36 +0100 Subject: [PATCH] ErrorHandler::globalHandler() returns current handler --- src/php_error.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/php_error.php b/src/php_error.php index fa55cd5..cf160b7 100644 --- a/src/php_error.php +++ b/src/php_error.php @@ -1278,6 +1278,15 @@ public function __construct( $options=null ) { $this->startBuffer(); } + /** + * Returns current global handler, or null if there is none. + * + * @return ErrorHandler */ + public static function globalHandler() { + global $_php_error_global_handler; + return $_php_error_global_handler; + } + /* * --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- * Public Functions