src/Router.php
public function getUri($route, $full = false)
    {
        $route = $this->validate($route);
        $path = $this->getPathValidated($route);
        if (is_string($path)) {
            return new Message\Uri($path);
        }
        if ($full) {
            $uri = $this->request->getUri()->withPath($this->request->pathToString($path));
        } else {
            $uri = new Message\Uri($this->request->pathToString($path));
        }
        $uri = $uri->withQuery($this->buildQuery($route->getQuery()))
            ->withFragment($route->getFragment());
        return $uri;
    }
public function getUri($route, $full = false)
    {
        $route = $this->validate($route);
        $path = $this->getPathValidated($route);
        if (is_string($path)) {
            return new Message\Uri($path);
        }
        if ($full) {
            $uri = $this->request->getUri()->withPath($this->request->pathToString($path));
        } else {
            $uri = new Message\Uri($this->request->pathToString($path));
        }
        $uri = $uri->withQuery($this->buildQuery($route->getQuery()))
            ->withFragment($route->getFragment());
        return $uri;
    }
public function getUri ( $ route , $ full = false ) { $ route = $ this -> validate ( $ route ) ; $ path = $ this -> getPathValidated ( $ route ) ; if ( is_string ( $ path ) ) { return new Message \ Uri ( $ path ) ; } if ( $ full ) { $ uri = $ this -> request -> getUri ( ) -> withPath ( $ this -> request -> pathToString ( $ path ) ) ; } else { $ uri = new Message \ Uri ( $ this -> request -> pathToString ( $ path ) ) ; } $ uri = $ uri -> withQuery ( $ this -> buildQuery ( $ route -> getQuery ( ) ) ) -> withFragment ( $ route -> getFragment ( ) ) ; return $ uri ; }
Get URI for a route.

@param string|array|Route|HasRoute $route A route.
@return Message\Uri Uri.
Get URI for a route .