You are here

class TraceableControllerResolver in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php \Symfony\Component\HttpKernel\Controller\TraceableControllerResolver

TraceableControllerResolver.

@author Fabien Potencier <fabien@symfony.com>

Hierarchy

Expanded class hierarchy of TraceableControllerResolver

File

vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php, line 22

Namespace

Symfony\Component\HttpKernel\Controller
View source
class TraceableControllerResolver implements ControllerResolverInterface {
  private $resolver;
  private $stopwatch;

  /**
   * Constructor.
   *
   * @param ControllerResolverInterface $resolver  A ControllerResolverInterface instance
   * @param Stopwatch                   $stopwatch A Stopwatch instance
   */
  public function __construct(ControllerResolverInterface $resolver, Stopwatch $stopwatch) {
    $this->resolver = $resolver;
    $this->stopwatch = $stopwatch;
  }

  /**
   * {@inheritdoc}
   */
  public function getController(Request $request) {
    $e = $this->stopwatch
      ->start('controller.get_callable');
    $ret = $this->resolver
      ->getController($request);
    $e
      ->stop();
    return $ret;
  }

  /**
   * {@inheritdoc}
   */
  public function getArguments(Request $request, $controller) {
    $e = $this->stopwatch
      ->start('controller.get_arguments');
    $ret = $this->resolver
      ->getArguments($request, $controller);
    $e
      ->stop();
    return $ret;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TraceableControllerResolver::$resolver private property
TraceableControllerResolver::$stopwatch private property
TraceableControllerResolver::getArguments public function Returns the arguments to pass to the controller. Overrides ControllerResolverInterface::getArguments
TraceableControllerResolver::getController public function Returns the Controller instance associated with a Request. Overrides ControllerResolverInterface::getController
TraceableControllerResolver::__construct public function Constructor.