Beispiel #1
0
 /**
  * Attach this observer to a new publisher
  * 
  * This also acts like a 'set' function, and null
  * is an acceptable value to be passed
  * 
  * @param Falcraft\Patterns\Resource\PublisherInterface
  * 
  */
 public function attach(PatternsResource\PublisherInterface $publisher)
 {
     $this->subject->add($publisher);
 }
Beispiel #2
0
 /**
  * Detach from the publisher
  * 
  */
 public function detach(PatternsResource\PublisherInterface $publisher)
 {
     if ($this->subject->in($publisher)) {
         $this->subject->remove($publisher);
     }
 }