public function createFromName(string $name, ...$args) : string
    {
        $route = $this->routeCollection->getNamedRoute($name);

        if ($route === null) {
            return '';
        }

        return $this->generateHost($route, $args) . $this->generatePath($route, $args);
    }
public function createFromName(string $name, ...$args) : string
    {
        $route = $this->routeCollection->getNamedRoute($name);

        if ($route === null) {
            return '';
        }

        return $this->generateHost($route, $args) . $this->generatePath($route, $args);
    }
public function createFromName ( string $ name , ... $ args ) : string { $ route = $ this -> routeCollection -> getNamedRoute ( $ name ) ; if ( $ route === null ) { return '' ; } return $ this -> generateHost ( $ route , $ args ) . $ this -> generatePath ( $ route , $ args ) ; }
Creates a URL for the named route
This function accepts variable-length arguments after the name

@param string $name The named of the route whose URL we're generating
@param array $args,... The list of arguments to pass in
@return string The generated URL if the route exists, otherwise an empty string
@throws URLException Thrown if there was an error generating the URL
Creates a URL for the named route This function accepts variable - length arguments after the name