This method registers a {@link http://www.php.net/manual/en/language.pseudo-types.php#language.types.callback callback}
which is called when the notification corresponding to the
criteria given at registration time is posted.
The criteria are the notification name and eventually the
class of the object posted with the notification.
If there are any pending notifications corresponding to the criteria
given here, the callback will be called straight away.
If the notification name is empty, the observer will receive all the
posted notifications. Same goes for the class name.
public addObserver ( $callback, $nName = EVENT_DISPATCHER_GLOBAL, $class = null ) : void | ||
Résultat | void |