[ Index ]

PHP Cross Reference of phpBB-3.3.5-deutsch

title

Body

[close]

/vendor/zendframework/zend-eventmanager/src/ -> AbstractListenerAggregate.php (source)

   1  <?php
   2  /**
   3   * Zend Framework (http://framework.zend.com/)
   4   *
   5   * @link      http://github.com/zendframework/zend-eventmanager for the canonical source repository
   6   * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
   7   * @license   https://github.com/zendframework/zend-eventmanager/blob/master/LICENSE.md
   8   */
   9  
  10  namespace Zend\EventManager;
  11  
  12  /**
  13   * Abstract aggregate listener
  14   */
  15  abstract class AbstractListenerAggregate implements ListenerAggregateInterface
  16  {
  17      /**
  18       * @var callable[]
  19       */
  20      protected $listeners = [];
  21  
  22      /**
  23       * {@inheritDoc}
  24       */
  25      public function detach(EventManagerInterface $events)
  26      {
  27          foreach ($this->listeners as $index => $callback) {
  28              $events->detach($callback);
  29              unset($this->listeners[$index]);
  30          }
  31      }
  32  }


Generated: Mon Oct 4 17:42:11 2021 Cross-referenced by PHPXref 0.7.1