Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 17130 программистов и 1833 робота. Сейчас ищут 1662 программиста ...

Event_Dispatcher::post

Вернуться к: Event_Dispatcher

Event_Dispatcher::post

Event_Dispatcher::post() – Post a notification.

Synopsis

require_once 'Event/Dispatcher.php';

object Event_Notification Event_Dispatcher::post ( object &$object , string $nName , mixed $info = array() , bool $pending = true , bool $bubble = true )

Post a new notification to all observers.

Parameter

  • object &$object

    Reference to the object that posts the notification (the sender). May be used to filter notifications in the callbacks.

  • string $nName

    Name of the notification.

  • mixed $info = array()

    Additional information about the notification.

  • bool $pending = true

    Notifications are by default added to a pending notification list. This way, if an observer is not registered by the time they are posted, it will still be notified when it is added as an observer.

    This behaviour can be turned off in order to make sure that only the registered observers will be notified.

  • bool $bubble = true

    Notifications are by default added broadcasted to any nested dispatchers that have been added using addNestedDispatcher().

    This behaviour can be turned off in order to make sure that only the observers added the posting dispatcher will be notified. This allows you to differentiate between global and local notifications.

Return value

object Event_Notification The notification object.

Note

This function can not be called statically.



Вернуться к: Event_Dispatcher

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware