Phergie_Plugin_Abstract::setEventHandler PHP Метод

setEventHandler() публичный Метод

Sets the current event handler.
public setEventHandler ( Phergie_Event_Handler $handler ) : Phergie_Plugin_Abstract
$handler Phergie_Event_Handler Event handler
Результат Phergie_Plugin_Abstract Provides a fluent interface
    public function setEventHandler(Phergie_Event_Handler $handler)
    {
        $this->events = $handler;
        return $this;
    }

Usage Example

Пример #1
0
 /**
  * Initializes instance properties.
  *
  * @return void
  */
 public function setUp()
 {
     if (empty($this->pluginClass)) {
         $this->pluginClass = preg_replace('/Test$/', '', get_class($this));
     }
     if (empty($this->plugin)) {
         $this->plugin = new $this->pluginClass();
     }
     $this->plugin->setConfig($this->getMockConfig());
     $this->plugin->setConnection($this->getMockConnection());
     $this->plugin->setEventHandler($this->getMockEventHandler());
     $this->plugin->setPluginHandler($this->getMockPluginHandler());
 }
All Usage Examples Of Phergie_Plugin_Abstract::setEventHandler