public function emit($event)
    {
        if (!empty($this->subjects[$event])) {

            /** @var \SplSubject $subject */
            foreach($this->subjects[$event] as $subject) {
                $subject->notify();
            }
        }
    }
public function emit($event)
    {
        if (!empty($this->subjects[$event])) {

            /** @var \SplSubject $subject */
            foreach($this->subjects[$event] as $subject) {
                $subject->notify();
            }
        }
    }
public function emit ( $ event ) { if ( ! empty ( $ this -> subjects [ $ event ] ) ) { /** @var \SplSubject $subject */ foreach ( $ this -> subjects [ $ event ] as $ subject ) { $ subject -> notify ( ) ; } } }
Triggers every subject attached to an event.

@param string $event
Triggers every subject attached to an event .