Re: set_error_handler help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I beleive you can also do

set_error_handler(array('classname', 'myMethod'));

for static methods.

- Craige
On Fri, May 2, 2008 at 2:26 PM, Richard Heyes <richardh@xxxxxxxxxxx> wrote:
>
> > Is there any way to use a class to handle errors? I've tried some stuff
> like
> > set_error_handler("Error_Handler::logError" and such, but with no luck.
> >
>
>  It accepts a "callback type, which is a pseudo type. Basically an array
> containg the object and the method to use. Eg.
>
>  $obj = new ErrorHandlingObject();
>  set_error_handler(array($obj, 'myMethod'));
>
>  --
>  Richard Heyes
>
>  +----------------------------------------+
>  | Access SSH with a Windows mapped drive |
>  |    http://www.phpguru.org/sftpdrive    |
>  +----------------------------------------+
>
>  --
>  PHP General Mailing List (http://www.php.net/)
>  To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux