src/Route.php
public function toUri(array $parameters = [])   
    {
        
        $pattern = $this->getPattern();

        $wildcardsRegexes = $this->wildcardsToRegexGroups(
            $matches = $this->getPatternWildcards()
        );

        $parameters = array_slice($parameters, 0, count($wildcardsRegexes));
        
        $this->validateParametersByWildcards($matches, $parameters);

        $uri = preg_replace($wildcardsRegexes, $parameters, $pattern, 1);

        return '/' . rtrim($uri, '/');

    }
public function toUri(array $parameters = [])   
    {
        
        $pattern = $this->getPattern();

        $wildcardsRegexes = $this->wildcardsToRegexGroups(
            $matches = $this->getPatternWildcards()
        );

        $parameters = array_slice($parameters, 0, count($wildcardsRegexes));
        
        $this->validateParametersByWildcards($matches, $parameters);

        $uri = preg_replace($wildcardsRegexes, $parameters, $pattern, 1);

        return '/' . rtrim($uri, '/');

    }
public function toUri ( array $ parameters = [ ] ) { $ pattern = $ this -> getPattern ( ) ; $ wildcardsRegexes = $ this -> wildcardsToRegexGroups ( $ matches = $ this -> getPatternWildcards ( ) ) ; $ parameters = array_slice ( $ parameters , 0 , count ( $ wildcardsRegexes ) ) ; $ this -> validateParametersByWildcards ( $ matches , $ parameters ) ; $ uri = preg_replace ( $ wildcardsRegexes , $ parameters , $ pattern , 1 ) ; return '/' . rtrim ( $ uri , '/' ) ; }
Generates the uri from current route

@param array $parameters
@return string
Generates the uri from current route