note 109417 deleted from function.set-exception-handler by danbrown
| From: | danbrown@php.net | Date: | Mon, 16 Jul 2012 15:03:46 +0000 |
| Subject: | note 109417 deleted from function.set-exception-handler by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189170@lists.php.net to get a copy of this message | ||
Note Submitter: Marinu666 - Tony
----
As the post above suggests you can use it with public methods on a class, incase anybody was
wondering this is how!
inside your class - you would have the normal, heres an example
class ehandle {
// constructor etc?
public function error_handler($errno, $errstr, $errfile, $errline) {
//logic
}
// maybe an exception handler here too ^.^
}
$ehandler = new ehandle();
// Error Handler With non-static as such
set_error_handler(array(&$ehandler, "error_handler"), E_ALL);
// Exception Handler with non-static as such
set_exception_handler(array(&$ehandler, "excep_handler"));
If somebody finds this helpful :) My work here is done!