Metabor\Observer\Subject::notify PHP Method

notify() public method

See also: SplSubject::notify()
public notify ( )
    public function notify()
    {
        /* @var $observer \SplObserver */
        foreach ($this->observers as $observer) {
            $observer->update($this);
        }
    }

Usage Example

Esempio n. 1
0
 public function testWillThrowAnExcpetionIfObserverIsNotAnEvent()
 {
     $command = $this->createTestInstance(array('__invoke'));
     $subject = new Subject();
     $subject->attach($command);
     $this->setExpectedException('\\Exception');
     $subject->notify();
 }