当前位置: 首页>>代码示例>>PHP>>正文


PHP EventDispatcherInterface::removeSubscriber方法代码示例

本文整理汇总了PHP中Symfony\Component\EventDispatcher\EventDispatcherInterface::removeSubscriber方法的典型用法代码示例。如果您正苦于以下问题:PHP EventDispatcherInterface::removeSubscriber方法的具体用法?PHP EventDispatcherInterface::removeSubscriber怎么用?PHP EventDispatcherInterface::removeSubscriber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Component\EventDispatcher\EventDispatcherInterface的用法示例。


在下文中一共展示了EventDispatcherInterface::removeSubscriber方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: removeAnnotationHandler

 /**
  * @param $name
  * @return $this
  * @throws \InvalidArgumentException
  */
 public function removeAnnotationHandler($name)
 {
     if (!isset($this->annotationHandlers[$name])) {
         throw new \InvalidArgumentException($name . ' is not registered');
     }
     $handler = $this->annotationHandlers[$name];
     $this->dispatcher->removeSubscriber($handler);
     unset($this->annotationHandlers[$name]);
     return $this;
 }
开发者ID:thewunder,项目名称:croute,代码行数:15,代码来源:Router.php

示例2: removeEventSubscriber

 /**
  * Removes an event subscriber from the dispatcher.
  *
  * @param EventSubscriberInterface $subscriber The subscriber to remove.
  *
  * @return static The current instance.
  *
  * @see EventDispatcherInterface::removeSubscriber()
  */
 public function removeEventSubscriber(EventSubscriberInterface $subscriber)
 {
     if (!$this->dispatcher) {
         $this->dispatcher = new EventDispatcher();
     }
     $this->dispatcher->removeSubscriber($subscriber);
     return $this;
 }
开发者ID:webmozart,项目名称:console,代码行数:17,代码来源:ApplicationConfig.php

示例3: onImportFinish

 public function onImportFinish(ImportProcessEvent $event, $eventName, EventDispatcherInterface $eventDispatcher)
 {
     if (!$this->isDryRun) {
         $this->import->getRun()->finish();
     }
     //remove the subscriber when its done
     $eventDispatcher->removeSubscriber($this);
 }
开发者ID:mathielen,项目名称:import-engine,代码行数:8,代码来源:ImportRunEventSubscriber.php

示例4: setWaitStrategy

 /**
  * Sets a WaitSubscriber using passed in WaitStrategy
  *
  * @param WaitStrategy $waitStrategy
  * @return $this
  */
 public function setWaitStrategy(WaitStrategy $waitStrategy)
 {
     if (null !== $this->waitSubscriber) {
         $this->eventDispatcher->removeSubscriber($this->waitSubscriber);
     }
     $this->waitSubscriber = new WaitSubscriber($waitStrategy);
     $this->addSubscriber($this->waitSubscriber);
     return $this;
 }
开发者ID:tebru,项目名称:executioner,代码行数:15,代码来源:Executor.php

示例5: disableFormatter

 /**
  * Disable formatter by name provided.
  *
  * @param string $formatter
  */
 public function disableFormatter($formatter)
 {
     $this->eventDispatcher->removeSubscriber($this->getFormatter($formatter));
 }
开发者ID:OverByThere,项目名称:Behat,代码行数:9,代码来源:OutputManager.php

示例6: removeSubscriber

 /**
  * Removes an event subscriber.
  *
  * @param EventSubscriberInterface $subscriber The subscriber.
  *
  * @return void
  */
 public function removeSubscriber(EventSubscriberInterface $subscriber)
 {
     $this->dispatcher->removeSubscriber($subscriber);
 }
开发者ID:amenk,项目名称:dc-general,代码行数:11,代码来源:EventPropagator.php

示例7: detachFromTestCase

 /**
  * Detaches listeners.
  *
  * @return void
  */
 protected function detachFromTestCase()
 {
     $this->_testCase = null;
     $this->_eventDispatcher->removeSubscriber($this);
 }
开发者ID:mablae,项目名称:phpunit-mink,代码行数:10,代码来源:BrowserConfiguration.php

示例8: onImportFinish

 public function onImportFinish(ImportProcessEvent $event, $eventName, EventDispatcherInterface $eventDispatcher)
 {
     //remove the subscriber when its done
     $eventDispatcher->removeSubscriber($this);
 }
开发者ID:mathielen,项目名称:import-engine,代码行数:5,代码来源:ContextSupplyConverter.php

示例9: removeSubscriber

 /**
  * @inheritdoc
  */
 public function removeSubscriber(EventSubscriberInterface $subscriber)
 {
     return $this->eventDispatcher->removeSubscriber($subscriber);
 }
开发者ID:bpolaszek,项目名称:bentools-etl,代码行数:7,代码来源:ETLManager.php


注:本文中的Symfony\Component\EventDispatcher\EventDispatcherInterface::removeSubscriber方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。