Event_Dispatcher::removeObserver() -- Remove an observer.


Remove an observer from dispatcher.

To remove an observer, specify the same parameters as used in the call to addObserver().


  • mixed $callback

    Callback to notity, may either be a string containing the name of a global function or an array containing class or object and the name of the method to call.


    Acts as a filter: notify the observer only if the notification name matches the name passed in this parameter. Use EVENT_DISPATCHER_GLOBAL if the observer should be notified regardles of the notification name.

  • string $class = ''

    Acts as a filter: notify the observer only if the sender of the notification matches the class passed in this parameter.

Return value

bool TRUE if the observer could be removed, FALSE otherwise


This function can not be called statically.

© Copyright 2003-2014 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.