private function buildParam(Route $route): array
    {
        $param = [];

        $url = \explode('/', $route->url);
        $matches = \explode('/', $this->routeMatches[0]);

        $rawParam = \array_diff($matches, $url);

        foreach ($rawParam as $key => $value) {
            $paramName = \strtr($url[$key], ['[' => '', ']' => '']);
            $param[$paramName] = $value;
        }

        return $param;
    }
private function buildParam(Route $route): array
    {
        $param = [];

        $url = \explode('/', $route->url);
        $matches = \explode('/', $this->routeMatches[0]);

        $rawParam = \array_diff($matches, $url);

        foreach ($rawParam as $key => $value) {
            $paramName = \strtr($url[$key], ['[' => '', ']' => '']);
            $param[$paramName] = $value;
        }

        return $param;
    }
private function buildParam ( Route $ route ) : array { $ param = [ ] ; $ url = \ explode ( '/' , $ route -> url ) ; $ matches = \ explode ( '/' , $ this -> routeMatches [ 0 ] ) ; $ rawParam = \ array_diff ( $ matches , $ url ) ; foreach ( $ rawParam as $ key => $ value ) { $ paramName = \ strtr ( $ url [ $ key ] , [ '[' => '' , ']' => '' ] ) ; $ param [ $ paramName ] = $ value ; } return $ param ; }
Try to find parameters in a valid route and return it.

@param Route $route

@return array
Try to find parameters in a valid route and return it .