public function make($name = null, array $arguments = [])
    {
        $name = $this->resolveName($name);

        if (is_scalar($name) && isset($this->routes[$name])) {
            return $this->routes[$name]->make($this->defaults['host'], $arguments);
        }

        foreach ($this->routes as $route) {
            if (!$route->check($name, $arguments)) {
                continue;
            }

            return $route->make($this->defaults['host'], $arguments);
        }

        throw new RouterException('Unable to make url, matching route for "' . $name . '" not found');
    }
public function make($name = null, array $arguments = [])
    {
        $name = $this->resolveName($name);

        if (is_scalar($name) && isset($this->routes[$name])) {
            return $this->routes[$name]->make($this->defaults['host'], $arguments);
        }

        foreach ($this->routes as $route) {
            if (!$route->check($name, $arguments)) {
                continue;
            }

            return $route->make($this->defaults['host'], $arguments);
        }

        throw new RouterException('Unable to make url, matching route for "' . $name . '" not found');
    }
public function make ( $ name = null , array $ arguments = [ ] ) { $ name = $ this -> resolveName ( $ name ) ; if ( is_scalar ( $ name ) && isset ( $ this -> routes [ $ name ] ) ) { return $ this -> routes [ $ name ] -> make ( $ this -> defaults [ 'host' ] , $ arguments ) ; } foreach ( $ this -> routes as $ route ) { if ( ! $ route -> check ( $ name , $ arguments ) ) { continue ; } return $ route -> make ( $ this -> defaults [ 'host' ] , $ arguments ) ; } throw new RouterException ( 'Unable to make url, matching route for "' . $ name . '" not found' ) ; }
Makes link
If corresponding route exists - friendly link is generated, otherwise normal

@param null|string $name      controller identifier, if null request controller is used
@param array       $arguments additional arguments

@return string
@throws RouterException
Makes link If corresponding route exists - friendly link is generated otherwise normal