src/EventManager.php
public function notify($event, $params)
    {
        $observers = $this->getObservers();

        if (isset($observers[$event])) {
            foreach ($observers[$event] as $observer) {
                $observer->setTriggeredEvent($event);
                $observer->setTriggeredEventParams($params);
                $observer->setBag($this->getBag());
                $observer->run();
           }
        }
    }
public function notify($event, $params)
    {
        $observers = $this->getObservers();

        if (isset($observers[$event])) {
            foreach ($observers[$event] as $observer) {
                $observer->setTriggeredEvent($event);
                $observer->setTriggeredEventParams($params);
                $observer->setBag($this->getBag());
                $observer->run();
           }
        }
    }
public function notify ( $ event , $ params ) { $ observers = $ this -> getObservers ( ) ; if ( isset ( $ observers [ $ event ] ) ) { foreach ( $ observers [ $ event ] as $ observer ) { $ observer -> setTriggeredEvent ( $ event ) ; $ observer -> setTriggeredEventParams ( $ params ) ; $ observer -> setBag ( $ this -> getBag ( ) ) ; $ observer -> run ( ) ; } } }
Method responsible for notifying observers upon event trigger
@param  string $event
@param  array $params
Method responsible for notifying observers upon event trigger