當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。