Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\HttpKernel\Controller; Chris@0: Chris@17: use Symfony\Component\HttpFoundation\Request; Chris@0: use Symfony\Component\Stopwatch\Stopwatch; Chris@0: Chris@0: /** Chris@0: * @author Fabien Potencier Chris@0: */ Chris@0: class TraceableArgumentResolver implements ArgumentResolverInterface Chris@0: { Chris@0: private $resolver; Chris@0: private $stopwatch; Chris@0: Chris@0: public function __construct(ArgumentResolverInterface $resolver, Stopwatch $stopwatch) Chris@0: { Chris@0: $this->resolver = $resolver; Chris@0: $this->stopwatch = $stopwatch; Chris@0: } Chris@0: Chris@0: /** Chris@0: * {@inheritdoc} Chris@0: */ Chris@0: public function getArguments(Request $request, $controller) Chris@0: { Chris@0: $e = $this->stopwatch->start('controller.get_arguments'); Chris@0: Chris@0: $ret = $this->resolver->getArguments($request, $controller); Chris@0: Chris@0: $e->stop(); Chris@0: Chris@0: return $ret; Chris@0: } Chris@0: }