예제 #1
0
 public function itKeepEachProxyIndependant()
 {
     $proxy_1 = new PluginProxy('DatPlugin', -2);
     $proxy_1->addListener('increment', 'increment', false);
     $proxy_2 = new PluginProxy('DatPlugin', 50);
     $proxy_2->addListener('increment', 'increment', false);
     $this->assertEqual($this->getCounterValue($proxy_1), 0);
     $this->assertEqual($this->getCounterValue($proxy_2), 0);
 }
예제 #2
0
 private function addListener($hook, PluginProxy $proxy)
 {
     $proxy->addListener($hook['event'], $hook['callback'], $hook['recall_event']);
     $this->event_manager->addListener($hook['event'], $proxy, 'processEvent', true);
 }