當前位置: 首頁>>代碼示例>>PHP>>正文


PHP EventManagerInterface::setIdentifiers方法代碼示例

本文整理匯總了PHP中Zend\EventManager\EventManagerInterface::setIdentifiers方法的典型用法代碼示例。如果您正苦於以下問題:PHP EventManagerInterface::setIdentifiers方法的具體用法?PHP EventManagerInterface::setIdentifiers怎麽用?PHP EventManagerInterface::setIdentifiers使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend\EventManager\EventManagerInterface的用法示例。


在下文中一共展示了EventManagerInterface::setIdentifiers方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setEventManager

 /**
  * Set the event manager instance used by this context
  *
  * @param  EventManagerInterface $events
  * @return void
  */
 public static function setEventManager(EventManagerInterface $events)
 {
     $identifiers = array(__CLASS__, 'zpropel');
     $events->setIdentifiers($identifiers);
     self::$events = $events;
     return;
 }
開發者ID:stevleibelt,項目名稱:zpropel,代碼行數:13,代碼來源:StaticManager.php

示例2: setEventManager

 /**
  * Set the event manager instance used by this context
  *
  * @param  EventManagerInterface $events
  * @return mixed
  */
 public function setEventManager(EventManagerInterface $events)
 {
     $identifiers = array(__CLASS__, get_called_class());
     $events->setIdentifiers($identifiers);
     $this->events = $events;
     return $this;
 }
開發者ID:shitikovkirill,項目名稱:zend-shop.com,代碼行數:13,代碼來源:EventProvider.php

示例3: setEventManager

 /**
  * Inject an EventManager instance
  *
  * @param  EventManagerInterface $eventManager
  * @return SendResponseListener
  */
 public function setEventManager(EventManagerInterface $eventManager)
 {
     $eventManager->setIdentifiers(array(__CLASS__, get_class($this)));
     $this->eventManager = $eventManager;
     $this->attachDefaultListeners();
     return $this;
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:13,代碼來源:SendResponseListener.php

示例4: setEventManager

 /**
  * @param  EventManagerInterface $eventManager
  * @return self
  */
 public function setEventManager(EventManagerInterface $eventManager)
 {
     $eventManager->setIdentifiers(array($this->eventIdentifier));
     $this->evm = $eventManager;
     $this->events = $eventManager;
     return $this;
 }
開發者ID:dotuancd,項目名稱:secretary,代碼行數:11,代碼來源:Base.php

示例5: withEventManager

 /**
  * @inheritdoc
  */
 public function withEventManager(EventManagerInterface $events)
 {
     $clone = clone $this;
     $events->setIdentifiers(array(__CLASS__, get_class($this)));
     $clone->events = $events;
     return $clone;
 }
開發者ID:lorenzoferrarajr,項目名稱:lfj-zfrenderer,代碼行數:10,代碼來源:Renderer.php

示例6: setEventManager

 /**
  * Set the event manager instance used by this context
  *
  * @param  EventManagerInterface $events
  * @return mixed
  */
 public function setEventManager(EventManagerInterface $events)
 {
     $events->setIdentifiers([__CLASS__, get_called_class()]);
     $this->events = $events;
     $this->attachDefaultListeners();
     return $this;
 }
開發者ID:jaztec,項目名稱:jaztec-base,代碼行數:13,代碼來源:AbstractService.php

示例7: setEventManager

 /**
  * (non-PHPdoc)
  * 
  * @see \Zend\EventManager\EventManagerAwareInterface::setEventManager()
  */
 public function setEventManager(EventManagerInterface $events)
 {
     $identifiers = $events->getIdentifiers();
     $identifiers += [$this->eventIdentifier, __CLASS__];
     $identifiers = array_unique($identifiers);
     $events->setIdentifiers($identifiers);
     $this->events = $events;
 }
開發者ID:alexsawallich,項目名稱:node,代碼行數:13,代碼來源:NodeInputFilter.php

示例8: getEventManager

 /**
  * Get the event manager
  *
  * @return EventManagerInterface
  */
 public function getEventManager()
 {
     if ($this->events === null) {
         $this->events = new EventManager();
         $this->events->setIdentifiers([__CLASS__, get_class($this)]);
     }
     return $this->events;
 }
開發者ID:axelmdev,項目名稱:ecommerce,代碼行數:13,代碼來源:AbstractAdapter.php

示例9: __construct

    /**
     * @param EventManagerInterface $eventManager
     */
    public function __construct(EventManagerInterface $eventManager)
    {
        $eventManager->setIdentifiers(array(
            __CLASS__,
            get_called_class(),
            'SlmQueue\Worker\WorkerInterface'
        ));

        $this->eventManager = $eventManager;
    }
開發者ID:jbarentsen,項目名稱:drb,代碼行數:13,代碼來源:AbstractWorker.php

示例10: setEventManager

 /**
  * setEventManager
  *
  * Set the event manager instance, by default add the implementing classes
  * name as the default identities
  *
  * Pass the new instance to the prepare method to allow for default
  * event manager configuration in child classes.
  *
  * @param \Zend\EventManager\EventManagerInterface $eventManager
  */
 public function setEventManager(EventManagerInterface $eventManager)
 {
     $this->eventManager = $eventManager;
     $eventManager->setIdentifiers([__CLASS__, get_class($this)]);
     if (isset($this->eventManagerIds) && is_array($this->eventManagerIds)) {
         $eventManager->addIdentifiers($this->eventManagerIds);
     }
     if (isset($this->eventClassName)) {
         $eventManager->setEventClass($this->eventClassName);
     }
     $this->prepareEventManager($eventManager);
 }
開發者ID:alex-patterson-webdev,項目名稱:arp-event,代碼行數:23,代碼來源:EventProviderTrait.php

示例11: setEventManager

 /**
  * @param EventManagerInterface $events
  * @return $this
  */
 public function setEventManager(EventManagerInterface $events)
 {
     $identifiers = array(__CLASS__, get_called_class());
     if (isset($this->eventIdentifier)) {
         if (is_string($this->eventIdentifier) || is_array($this->eventIdentifier) || $this->eventIdentifier instanceof Traversable) {
             $identifiers = array_unique(array_merge($identifiers, (array) $this->eventIdentifier));
         } elseif (is_object($this->eventIdentifier)) {
             $identifiers[] = $this->eventIdentifier;
         }
     }
     $events->setIdentifiers($identifiers);
     $this->events = $events;
     return $this;
 }
開發者ID:bedi,項目名稱:mfcc-admin-module,代碼行數:18,代碼來源:EventProvider.php

示例12: setEventManager

 /**
  * Set the event manager instance used by this context
  *
  * @param  EventManagerInterface $events
  * @return mixed
  */
 public function setEventManager(EventManagerInterface $events)
 {
     $identifiers = array(current(explode('\\', get_called_class())), __CLASS__, get_called_class());
     if (isset($this->eventIdentifier)) {
         if (is_string($this->eventIdentifier) || is_array($this->eventIdentifier) || $this->eventIdentifier instanceof Traversable) {
             $identifiers = array_unique(array_merge($identifiers, (array) $this->eventIdentifier));
         } elseif (is_object($this->eventIdentifier)) {
             $identifiers[] = $this->eventIdentifier;
         }
         // silently ignore invalid eventIdentifier types
     }
     $events->setIdentifiers($identifiers);
     $this->events = $events;
     return $this;
 }
開發者ID:zucchi,項目名稱:zucchi,代碼行數:21,代碼來源:EventProviderTrait.php

示例13: setEventManager

 /**
  * Set the event manager instance used by this context
  *
  * @param  EventManagerInterface $events
  * @return $this
  */
 public function setEventManager(EventManagerInterface $events)
 {
     $identifiers = [__CLASS__, get_class($this)];
     if (isset($this->eventIdentifier)) {
         if (is_string($this->eventIdentifier) || is_array($this->eventIdentifier) || $this->eventIdentifier instanceof \Traversable) {
             $identifiers = array_unique(array_merge($identifiers, (array) $this->eventIdentifier));
         } elseif (is_object($this->eventIdentifier)) {
             $identifiers[] = $this->eventIdentifier;
         }
         // silently ignore invalid eventIdentifier types
     }
     $events->setIdentifiers($identifiers);
     $this->events = $events;
     $this->attachDefaultListener();
     return $this;
 }
開發者ID:leogr,項目名稱:zf2-auth-module,代碼行數:22,代碼來源:AuthenticationService.php

示例14: setEventManager

 /**
  * {@inheritDoc}
  */
 public function setEventManager(EventManagerInterface $eventManager)
 {
     $eventManager->setIdentifiers(array(__CLASS__, get_class($this)));
     $this->eventManager = $eventManager;
 }
開發者ID:leonardovn86,項目名稱:zf2_basic2013,代碼行數:8,代碼來源:AggregateHydrator.php

示例15: setEventManager

 /**
  * @param EventManagerInterface $eventManager
  */
 public function setEventManager(EventManagerInterface $eventManager)
 {
     $eventManager->setIdentifiers(['Zend\\Stdlib\\DispatchableInterface', __CLASS__, get_class($this)]);
     $eventManager->attach(MvcEvent::EVENT_DISPATCH, array($this, 'onDispatch'));
     $this->eventManager = $eventManager;
 }
開發者ID:DavidHavl,項目名稱:Ajasta,代碼行數:9,代碼來源:HttpControllerBridge.php


注:本文中的Zend\EventManager\EventManagerInterface::setIdentifiers方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。