Re: [PEPr] +1 for Event::Dispatcher
| From: | Stephan Schmidt | Date: | Sat, 15 Jan 2005 12:00:40 +0000 |
| Subject: | Re: [PEPr] +1 for Event::Dispatcher | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-35503@lists.php.net to get a copy of this message | ||
Hi,
Bertrand Mansion schrieb:
- PHP4 checks with call_user_func($callback, $notification) and references. This might need to be changed to $object->$method($notification) and $class::$method($notification) if the reference is lost in the first case or maybe the better solution would be to use call_user_func_array($callback, array(&$notification)); References are surely getting lost here:call_user_func($rObserver['callback'], $notification); I used call_user_func($rObserver['callback'], &$notification); which may raise a notice, but this works. If references get lost at this point, it's not possible to cancel notifications. I have to leave now, but I'll try to find a better solution (without notices) during the weekend. Thanks for itengrating my code, Stephan -- http://www.php-tools.net http://www.schst.net http://pear.php.net