コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function hasListeners($eventName = null)
 {
     return $this->_wrappedDispatcher->hasListeners($eventName);
 }
コード例 #2
0
 public function testRemoveBeforeDispatch()
 {
     $service = $this->getMock('Symfony\\Component\\EventDispatcher\\Tests\\Service');
     $container = new Container();
     $container->set('service.listener', $service);
     $dispatcher = new ContainerAwareEventDispatcher($container);
     $dispatcher->addListenerService('onEvent', array('service.listener', 'onEvent'));
     $dispatcher->removeListener('onEvent', array($container->get('service.listener'), 'onEvent'));
     $this->assertFalse($dispatcher->hasListeners('onEvent'));
 }
コード例 #3
0
 /**
  * {@inheritdoc}
  */
 public function hasListeners($eventName = null)
 {
     return $this->originalDispatcher->hasListeners($eventName);
 }