Exemple #1
0
 /**
  * Triggers an option event if this options instance has a connection to
  * an adapter implements EventsCapableInterface.
  *
  * @param string $optionName
  * @param mixed  $optionValue
  * @return void
  */
 protected function triggerOptionEvent($optionName, $optionValue)
 {
     if ($this->adapter instanceof EventsCapableInterface) {
         $event = new Event('option', $this->adapter, new ArrayObject(array($optionName => $optionValue)));
         $this->adapter->events()->trigger($event);
     }
 }
Exemple #2
0
 /**
  * Triggers an option.change event
  * if the this options instance has a connection too an adapter instance
  *
  * @param string $optionName
  * @param mixed  $optionValue
  * @return void
  */
 protected function triggerOptionEvent($optionName, $optionValue)
 {
     if (!$this->adapter) {
         return;
     }
     $event = new Event('option', $this->adapter, new ArrayObject(array($optionName => $optionValue)));
     $this->adapter->events()->trigger($event);
 }