src/Factory.php
public function url($project = null, $ref = null, $doc = null)
    {
        $uri = $this->config('base_route');

        if ( ! is_null($project) )
        {
            if ( ! $project instanceof Project )
            {
                $project = $this->getProject($project);
            }
            $uri .= '/' . $project->getName();


            if ( ! is_null($ref) )
            {
                $uri .= '/' . $ref;
            }
            else
            {
                $uri .= '/' . $project->getDefaultRef();
            }


            if ( ! is_null($doc) )
            {
                $uri .= '/' . $doc;
            }
        }

        return url($uri);
    }
public function url($project = null, $ref = null, $doc = null)
    {
        $uri = $this->config('base_route');

        if ( ! is_null($project) )
        {
            if ( ! $project instanceof Project )
            {
                $project = $this->getProject($project);
            }
            $uri .= '/' . $project->getName();


            if ( ! is_null($ref) )
            {
                $uri .= '/' . $ref;
            }
            else
            {
                $uri .= '/' . $project->getDefaultRef();
            }


            if ( ! is_null($doc) )
            {
                $uri .= '/' . $doc;
            }
        }

        return url($uri);
    }
public function url ( $ project = null , $ ref = null , $ doc = null ) { $ uri = $ this -> config ( 'base_route' ) ; if ( ! is_null ( $ project ) ) { if ( ! $ project instanceof Project ) { $ project = $ this -> getProject ( $ project ) ; } $ uri .= '/' . $ project -> getName ( ) ; if ( ! is_null ( $ ref ) ) { $ uri .= '/' . $ ref ; } else { $ uri .= '/' . $ project -> getDefaultRef ( ) ; } if ( ! is_null ( $ doc ) ) { $ uri .= '/' . $ doc ; } } return url ( $ uri ) ; }
Generate a URL to a project's default page and version.

@param  Project|string $project A Project instance or projectName, will auto-resolve
@param  null|string    $ref
@param  null|string    $doc
@return string
Generate a URL to a project s default page and version .