RE: [PHP] set_error_handler inside a class
| From: | John W. Holmes | Date: | Tue, 28 Jan 2003 17:51:09 +0000 |
| Subject: | RE: [PHP] set_error_handler inside a class | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133404@lists.php.net to get a copy of this message | ||
> hi guys how is ti possible to do a set_error_handler within a class so
it
> will trigger the callback function and so will be able to return the
line
> and file in the message ?
You'd set it just like you would anywhere else in your code.
If you want the callback function to be a method in your class, then you
pass an array to set_error_handler(). Details are in the manual on the
format of the array. It'll be the same as any other callback function
that you can send a classes method to.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/