[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/vendor/symfony/http-kernel/Controller/ -> TraceableControllerResolver.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\Controller;
  13  
  14  use Symfony\Component\HttpFoundation\Request;
  15  use Symfony\Component\Stopwatch\Stopwatch;
  16  
  17  /**
  18   * @author Fabien Potencier <fabien@symfony.com>
  19   */
  20  class TraceableControllerResolver implements ControllerResolverInterface
  21  {
  22      private $resolver;
  23      private $stopwatch;
  24  
  25      public function __construct(ControllerResolverInterface $resolver, Stopwatch $stopwatch)
  26      {
  27          $this->resolver = $resolver;
  28          $this->stopwatch = $stopwatch;
  29      }
  30  
  31      /**
  32       * {@inheritdoc}
  33       */
  34      public function getController(Request $request)
  35      {
  36          $e = $this->stopwatch->start('controller.get_callable');
  37  
  38          $ret = $this->resolver->getController($request);
  39  
  40          $e->stop();
  41  
  42          return $ret;
  43      }
  44  
  45      /**
  46       * {@inheritdoc}
  47       */
  48      public function getArguments(Request $request, $controller)
  49      {
  50          $e = $this->stopwatch->start('controller.get_arguments');
  51  
  52          $ret = $this->resolver->getArguments($request, $controller);
  53  
  54          $e->stop();
  55  
  56          return $ret;
  57      }
  58  }


Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1