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


PHP EventManager\SharedEventManagerInterface类代码示例

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


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

示例1: detachShared

 /**
  * Detach all our listeners from the event manager
  *
  * @param  SharedEventManagerInterface $events
  * @return void
  */
 public function detachShared(SharedEventManagerInterface $events)
 {
     if ($events->detach('Zend\\Mvc\\Application', $this->listener)) {
         $this->listener = null;
     }
     return true;
 }
开发者ID:webpants,项目名称:YAWIK,代码行数:13,代码来源:TokenListener.php

示例2: detachShared

 /**
  * {@inheritDoc}
  */
 public function detachShared(SharedEventManagerInterface $events)
 {
     foreach ($this->listeners as $listener) {
         $events->detach(self::EVENT_IDENTIFIER, $listener);
     }
     unset($this->listeners);
 }
开发者ID:API-Skeletons,项目名称:zf-apigility-doctrine,代码行数:10,代码来源:EventCatcher.php

示例3: attachShared

 public function attachShared(SharedEventManagerInterface $events)
 {
     $class = $this->getMonitoredClass();
     $events->attach($class, 'commit', [$this, 'onAddRevision'], 1);
     $events->attach($class, 'checkout', [$this, 'onCheckout'], -1);
     $events->attach($class, 'reject', [$this, 'onReject'], -1);
 }
开发者ID:andreas-serlo,项目名称:athene2,代码行数:7,代码来源:RepositoryManagerListener.php

示例4: detachShared

 /**
  * @param SharedEventManagerInterface $events
  */
 public function detachShared(SharedEventManagerInterface $events)
 {
     foreach ($this->sharedListeners as $index => $listener) {
         if ($events->detach('ZF\\Rest\\RestController', $listener)) {
             unset($this->sharedListeners[$index]);
         }
     }
 }
开发者ID:noc-med,项目名称:zf-rest,代码行数:11,代码来源:RestParametersListener.php

示例5: detachShared

 /**
  * {@inheritdoc}
  */
 public function detachShared(SharedEventManagerInterface $events)
 {
     foreach ($this->listeners as $id => $listener) {
         if ($events->detach($id, $listener)) {
             unset($this->listeners[$id]);
         }
     }
 }
开发者ID:Tigerlee1987,项目名称:modules.zendframework.com,代码行数:11,代码来源:LoginListener.php

示例6: attachShared

 /**
  * @param SharedEventManagerInterface $events
  */
 public function attachShared(SharedEventManagerInterface $events)
 {
     $listener = $events->attach(RestController::class, MvcEvent::EVENT_DISPATCH, [$this, 'onDispatch'], 100);
     if (!$listener) {
         $listener = [$this, 'onDispatch'];
     }
     $this->sharedListeners[] = $listener;
 }
开发者ID:Wilt,项目名称:zf-rest,代码行数:11,代码来源:RestParametersListener.php

示例7: detachShared

 /**
  * @inheritdoc
  */
 public function detachShared(SharedEventManagerInterface $events)
 {
     foreach ($this->listeners as $index => $listener) {
         if ($events->detach(AclService::class, $listener)) {
             unset($this->listeners[$index]);
         }
     }
 }
开发者ID:omusico,项目名称:zf2-demo,代码行数:11,代码来源:AclIsNotAllowedListener.php

示例8: detachShared

 public function detachShared(SharedEventManagerInterface $events)
 {
     foreach ($this->sharedListeners as $index => $listener) {
         if ($events->detach($this->eventIdentifier, $listener)) {
             unset($this->sharedListeners[$index]);
         }
     }
 }
开发者ID:roelvanduijnhoven,项目名称:JwPersistentUser,代码行数:8,代码来源:WriteTokenToCookie.php

示例9: attachShared

 public function attachShared(SharedEventManagerInterface $events)
 {
     $monitoredClass = $this->getMonitoredClass();
     $events->attach($monitoredClass, 'create', [$this, 'onCreate']);
     $events->attach($monitoredClass, 'update', [$this, 'onUpdate']);
     $events->attach($monitoredClass, 'associate', [$this, 'onAssociate']);
     $events->attach($monitoredClass, 'dissociate', [$this, 'onDissociate']);
 }
开发者ID:andreas-serlo,项目名称:athene2,代码行数:8,代码来源:TaxonomyManagerListener.php

示例10: attachShared

 public function attachShared(SharedEventManagerInterface $events)
 {
     $class = $this->getMonitoredClass();
     $events->attach($class, 'start', [$this, 'onStart']);
     $events->attach($class, 'comment', [$this, 'onComment']);
     $events->attach($class, 'archive', [$this, 'onArchive']);
     $events->attach($class, 'restore', [$this, 'onRestore']);
 }
开发者ID:andreas-serlo,项目名称:athene2,代码行数:8,代码来源:DiscussionManagerListener.php

示例11: detachShared

 /**
  * @inheritdoc
  */
 public function detachShared(SharedEventManagerInterface $events)
 {
     foreach ($this->listeners as $index => $listener) {
         if ($events->detach(AbstractActionController::class, $listener)) {
             unset($this->listeners[$index]);
         }
     }
 }
开发者ID:omusico,项目名称:zf2-demo,代码行数:11,代码来源:CheckAccessListener.php

示例12: detachShared

 public function detachShared(SharedEventManagerInterface $events)
 {
     foreach ($this->listeners as $index => $callback) {
         if ($events->dettach($callback)) {
             unset($this->listeners[$index]);
         }
     }
 }
开发者ID:av4tar,项目名称:sheti,代码行数:8,代码来源:IssueCacheListener.php

示例13: detachShared

 public function detachShared(\Zend\EventManager\SharedEventManagerInterface $events)
 {
     foreach ($this->listeners as $index => $listener) {
         if ($events->detach($this->getMonitoredClass(), $listener)) {
             unset($this->listeners[$index]);
         }
     }
 }
开发者ID:andreas-serlo,项目名称:athene2,代码行数:8,代码来源:AbstractSharedListenerAggregate.php

示例14: attachShared

 public function attachShared(SharedEventManagerInterface $events, $priority = null)
 {
     $this->priority = $priority;
     $listeners = array();
     $listeners[] = $events->attach($this->identity, 'foo.bar', array($this, 'fooBar'));
     $listeners[] = $events->attach($this->identity, 'foo.baz', array($this, 'fooBaz'));
     $this->listeners[\spl_object_hash($events)] = $listeners;
     return __METHOD__;
 }
开发者ID:rajanlamic,项目名称:IntTest,代码行数:9,代码来源:SharedMockAggregate.php

示例15: attachShared

 public function attachShared(SharedEventManagerInterface $events)
 {
     $events->attach('*', NotificationEvent::EVENT_NOTIFICATION_ADD, array($this, 'add'), 1);
     $events->attach('Zend\\Mvc\\Application', MvcEvent::EVENT_DISPATCH, array($this, 'renderJSON'), -240);
     $events->attach('Zend\\Mvc\\Application', MvcEvent::EVENT_DISPATCH, array($this, 'renderHTML'), -250);
     // Sometimes the Dispatch-Event is not reached, for instance with a route-direct
     // but also for Events, that are happening after the Dispatch
     $events->attach('Zend\\Mvc\\Application', MvcEvent::EVENT_FINISH, array($this, 'renderHTML'), -250);
     return $this;
 }
开发者ID:webpants,项目名称:YAWIK,代码行数:10,代码来源:NotificationListener.php


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