Beispiel #1
0
 private function addListeners(PluginItem $pluginItem, EventSubscriber $subscriber)
 {
     foreach ($subscriber->getEventListeners() as $eventName => $listener) {
         if (true == is_string($listener)) {
             $this->dispatcher->addListener($eventName, [$pluginItem->getPlugin(), $listener]);
         } else {
             $this->dispatcher->addListener($eventName, $listener);
         }
     }
 }
Beispiel #2
0
 public function testGetPugin()
 {
     $pluginItem = new PluginItem($this->pluginMock);
     $this->assertInstanceOf('Yosymfony\\Spress\\Core\\Plugin\\PluginInterface', $pluginItem->getPlugin());
 }