0 follower

Final Class Yiisoft\Router\Debug\UrlMatcherInterfaceProxy

InheritanceYiisoft\Router\Debug\UrlMatcherInterfaceProxy
ImplementsYiisoft\Router\UrlMatcherInterface

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( Yiisoft\Router\UrlMatcherInterface $urlMatcher, Yiisoft\Router\Debug\RouterCollector $routerCollector )
$urlMatcher Yiisoft\Router\UrlMatcherInterface
$routerCollector Yiisoft\Router\Debug\RouterCollector

                public function __construct(
    private readonly UrlMatcherInterface $urlMatcher,
    private readonly RouterCollector $routerCollector
) {
}

            
match() public method

public Yiisoft\Router\MatchingResult match ( \Psr\Http\Message\ServerRequestInterface $request )
$request \Psr\Http\Message\ServerRequestInterface

                public function match(ServerRequestInterface $request): MatchingResult
{
    $timeStart = microtime(true);
    $result = $this->urlMatcher->match($request);
    $this->routerCollector->collect(microtime(true) - $timeStart);
    return $result;
}