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


PHP EventManager::setIdentifiers方法代码示例

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


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

示例1: getEventManager

 private function getEventManager()
 {
     if (!$this->eventManager) {
         $this->eventManager = new EventManager();
         $this->eventManager->setIdentifiers(get_class($this));
     }
     return $this->eventManager;
 }
开发者ID:t4web,项目名称:cron,代码行数:8,代码来源:Executor.php

示例2: createPrivateEventManager

 /**
  * @return EventManagerInterface
  */
 private function createPrivateEventManager($eventClazz)
 {
     $events = new EventManager();
     $events->setIdentifiers(array('ZfcUserAdmin', $eventClazz));
     $events->setEventClass($eventClazz);
     return $events;
 }
开发者ID:evilband7,项目名称:ZfcUserAdmin,代码行数:10,代码来源:UserAdminController.php

示例3: let

 /**
  * @param \Zend\EventManager\EventManager $eventManager
  */
 public function let($eventManager)
 {
     $eventManager->trigger(Argument::cetera())->willReturn(true);
     $eventManager->setIdentifiers(Argument::cetera())->willReturn(true);
     $eventManager->attach(Argument::cetera())->willReturn(true);
     $this->setEventManager($eventManager);
 }
开发者ID:phpro,项目名称:zf-annotated-forms,代码行数:10,代码来源:BuilderSpec.php

示例4: createServiceWithName

 public function createServiceWithName(ServiceLocatorInterface $serviceManager, $name, $requestedName)
 {
     $eventManager = new ZendEventManager();
     $entityEventManager = new EntityEventManager($eventManager);
     $entityParams = explode('\\', $requestedName);
     if (isset($entityParams[0])) {
         $eventManager->setIdentifiers($entityParams[0]);
     }
     return $entityEventManager;
 }
开发者ID:t4web,项目名称:domain-module,代码行数:10,代码来源:EntityEventManagerAbstractFactory.php

示例5: getEventManager

 /**
  * Attempt to marshal an EventManager instance.
  *
  * If an instance is already available, return it.
  *
  * If the zend-eventmanager component is not present, return nothing.
  *
  * Otherwise, marshal the instance in a version-agnostic way, and return
  * it.
  *
  * @return null|EventManager
  */
 private function getEventManager()
 {
     if ($this->events) {
         return $this->events;
     }
     if (!class_exists(EventManager::class)) {
         return;
     }
     $this->events = new EventManager();
     $this->events->setIdentifiers([__CLASS__]);
     return $this->events;
 }
开发者ID:zendframework,项目名称:zend-ldap,代码行数:24,代码来源:Node.php

示例6: authenticate

 /**
  * @param AdapterInterface|null $adapter
  * @return AuthResult
  */
 public function authenticate(AdapterInterface $adapter = null)
 {
     $event = new AuthenticationEvent();
     $event->setTarget($this);
     if (!$adapter) {
         $adapter = $this->adapter;
     }
     if ($adapter) {
         $event->setAdapter($adapter);
     }
     $eventManager = new EventManager();
     $eventManager->setIdentifiers(get_class($this));
     $eventManager->trigger($event);
     return $event->getResult();
 }
开发者ID:t4web,项目名称:authentication,代码行数:19,代码来源:Authenticator.php

示例7: setEventManager

 /**
  * Set EventManager instance
  * 
  * @param EventManager $eventManager
  * 
  * @return void
  */
 public function setEventManager(EventManager $eventManager)
 {
     $this->eventManager = $eventManager;
     $this->eventManager->setIdentifiers(array('EventStore'));
 }
开发者ID:malocher,项目名称:zf2-event-store-module,代码行数:12,代码来源:EventManagerProxy.php

示例8: index09Action

 public function index09Action()
 {
     $eventManagerOne = new EventManager();
     //$eventManagerOne = new EventManager(array("emOne","emTwo"));
     $eventManagerOne->setIdentifiers(array("emOne", "emTwo"));
     $listener1 = $eventManagerOne->attach("eventOne", function ($e) {
         echo "<h3 style='color:red;font-weight:bold'>eventManagerOne - eventOne - Do 1</h3>";
     });
     $eventManagerOne->trigger("eventOne");
     $ids = $eventManagerOne->getIdentifiers();
     echo "<pre style='font-weight:bold'>";
     print_r($ids);
     echo "</pre>";
     return false;
 }
开发者ID:trongle,项目名称:zend-2,代码行数:15,代码来源:EventController.php

示例9: setEventManager

 /**
  * Inject an EventManager instance
  *
  * @param  EventManagerInterface $eventManager
  *
  * @return void
  */
 public function setEventManager(EventManagerInterface $eventManager)
 {
     $this->eventManager = $eventManager;
     $this->eventManager->setIdentifiers(self::EVENT_MANAGER_IDENTIFIER);
 }
开发者ID:zfstarter,项目名称:zfs-rbac,代码行数:12,代码来源:Rbac.php


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