protected function createResult(Route $route, ServerRequestInterface $request, array $matches): Match
    {
        $attributes = $route->getAttributes();

        foreach ($attributes as $index => $attribute) {
            $name = $attribute->getName();

            if (array_key_exists($index, $matches)) {
                $request = $request->withAttribute($name, $matches[$index]);
            }
        }

        return new Match($route, $request);
    }
protected function createResult(Route $route, ServerRequestInterface $request, array $matches): Match
    {
        $attributes = $route->getAttributes();

        foreach ($attributes as $index => $attribute) {
            $name = $attribute->getName();

            if (array_key_exists($index, $matches)) {
                $request = $request->withAttribute($name, $matches[$index]);
            }
        }

        return new Match($route, $request);
    }
protected function createResult ( Route $ route , ServerRequestInterface $ request , array $ matches ) : Match { $ attributes = $ route -> getAttributes ( ) ; foreach ( $ attributes as $ index => $ attribute ) { $ name = $ attribute -> getName ( ) ; if ( array_key_exists ( $ index , $ matches ) ) { $ request = $ request -> withAttribute ( $ name , $ matches [ $ index ] ) ; } } return new Match ( $ route , $ request ) ; }
Creates a match.

@param Route $route
@param ServerRequestInterface $request
@param string[] $matches
@return Match
Creates a match .