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);
    }