[ Index ]

PHP Cross Reference of phpBB-3.1.12-deutsch

title

Body

[close]

/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ -> EventDataCollector.php (source)

   1  <?php
   2  
   3  /*
   4   * This file is part of the Symfony package.
   5   *
   6   * (c) Fabien Potencier <fabien@symfony.com>
   7   *
   8   * For the full copyright and license information, please view the LICENSE
   9   * file that was distributed with this source code.
  10   */
  11  
  12  namespace Symfony\Component\HttpKernel\DataCollector;
  13  
  14  use Symfony\Component\HttpFoundation\Request;
  15  use Symfony\Component\HttpFoundation\Response;
  16  use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface;
  17  
  18  /**
  19   * EventDataCollector.
  20   *
  21   * @author Fabien Potencier <fabien@symfony.com>
  22   */
  23  class EventDataCollector extends DataCollector
  24  {
  25      /**
  26       * {@inheritdoc}
  27       */
  28      public function collect(Request $request, Response $response, \Exception $exception = null)
  29      {
  30          $this->data = array(
  31              'called_listeners' => array(),
  32              'not_called_listeners' => array(),
  33          );
  34      }
  35  
  36      /**
  37       * Sets the called listeners.
  38       *
  39       * @param array $listeners An array of called listeners
  40       *
  41       * @see TraceableEventDispatcherInterface
  42       */
  43      public function setCalledListeners(array $listeners)
  44      {
  45          $this->data['called_listeners'] = $listeners;
  46      }
  47  
  48      /**
  49       * Gets the called listeners.
  50       *
  51       * @return array An array of called listeners
  52       *
  53       * @see TraceableEventDispatcherInterface
  54       */
  55      public function getCalledListeners()
  56      {
  57          return $this->data['called_listeners'];
  58      }
  59  
  60      /**
  61       * Sets the not called listeners.
  62       *
  63       * @param array $listeners An array of not called listeners
  64       *
  65       * @see TraceableEventDispatcherInterface
  66       */
  67      public function setNotCalledListeners(array $listeners)
  68      {
  69          $this->data['not_called_listeners'] = $listeners;
  70      }
  71  
  72      /**
  73       * Gets the not called listeners.
  74       *
  75       * @return array An array of not called listeners
  76       *
  77       * @see TraceableEventDispatcherInterface
  78       */
  79      public function getNotCalledListeners()
  80      {
  81          return $this->data['not_called_listeners'];
  82      }
  83  
  84      /**
  85       * {@inheritdoc}
  86       */
  87      public function getName()
  88      {
  89          return 'events';
  90      }
  91  }


Generated: Thu Jan 11 00:25:41 2018 Cross-referenced by PHPXref 0.7.1