matomo
/
app
/
vendor
/
prefixed
/
symfony
/
http-kernel
/
Controller
/
TraceableArgumentResolver.php
ArgumentResolver
1 year ago
ArgumentResolver.php
1 year ago
ArgumentResolverInterface.php
2 years ago
ArgumentValueResolverInterface.php
2 years ago
ContainerControllerResolver.php
2 years ago
ControllerReference.php
2 years ago
ControllerResolver.php
1 year ago
ControllerResolverInterface.php
2 years ago
ErrorController.php
1 year ago
TraceableArgumentResolver.php
2 years ago
TraceableControllerResolver.php
2 years ago
TraceableArgumentResolver.php
40 lines
| 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 | namespace Matomo\Dependencies\Symfony\Component\HttpKernel\Controller; |
| 12 | |
| 13 | use Matomo\Dependencies\Symfony\Component\HttpFoundation\Request; |
| 14 | use Symfony\Component\Stopwatch\Stopwatch; |
| 15 | /** |
| 16 | * @author Fabien Potencier <fabien@symfony.com> |
| 17 | */ |
| 18 | class TraceableArgumentResolver implements ArgumentResolverInterface |
| 19 | { |
| 20 | private $resolver; |
| 21 | private $stopwatch; |
| 22 | public function __construct(ArgumentResolverInterface $resolver, Stopwatch $stopwatch) |
| 23 | { |
| 24 | $this->resolver = $resolver; |
| 25 | $this->stopwatch = $stopwatch; |
| 26 | } |
| 27 | /** |
| 28 | * {@inheritdoc} |
| 29 | */ |
| 30 | public function getArguments(Request $request, callable $controller) |
| 31 | { |
| 32 | $e = $this->stopwatch->start('controller.get_arguments'); |
| 33 | try { |
| 34 | return $this->resolver->getArguments($request, $controller); |
| 35 | } finally { |
| 36 | $e->stop(); |
| 37 | } |
| 38 | } |
| 39 | } |
| 40 |