4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\HttpKernel\Controller;
14 use Symfony\Component\Stopwatch\Stopwatch;
15 use Symfony\Component\HttpFoundation\Request;
18 * TraceableControllerResolver.
20 * @author Fabien Potencier <fabien@symfony.com>
22 class TraceableControllerResolver implements ControllerResolverInterface
30 * @param ControllerResolverInterface $resolver A ControllerResolverInterface instance
31 * @param Stopwatch $stopwatch A Stopwatch instance
33 public function __construct(ControllerResolverInterface $resolver, Stopwatch $stopwatch)
35 $this->resolver = $resolver;
36 $this->stopwatch = $stopwatch;
42 public function getController(Request $request)
44 $e = $this->stopwatch->start('controller.get_callable');
46 $ret = $this->resolver->getController($request);
56 public function getArguments(Request $request, $controller)
58 $e = $this->stopwatch->start('controller.get_arguments');
60 $ret = $this->resolver->getArguments($request, $controller);