public function getLink($page, $header = null)
    {
        $id = preg_replace('/[^a-z0-9\/]+/i', '', $page);
        $link = $this->getBaseUrl() . '/' . $id;

        if ($header !== null) {
            $link .= '#' . $this->createId($header);
        } else if ($id == 'index') {
            $link = $this->getBaseUrl();
        }

        return $link;
    }
public function getLink($page, $header = null)
    {
        $id = preg_replace('/[^a-z0-9\/]+/i', '', $page);
        $link = $this->getBaseUrl() . '/' . $id;

        if ($header !== null) {
            $link .= '#' . $this->createId($header);
        } else if ($id == 'index') {
            $link = $this->getBaseUrl();
        }

        return $link;
    }
public function getLink ( $ page , $ header = null ) { $ id = preg_replace ( '/[^a-z0-9\/]+/i' , '' , $ page ) ; $ link = $ this -> getBaseUrl ( ) . '/' . $ id ; if ( $ header !== null ) { $ link .= '#' . $ this -> createId ( $ header ) ; } else if ( $ id == 'index' ) { $ link = $ this -> getBaseUrl ( ) ; } return $ link ; }
Gets the link for the given source file.

@param SourceFile $page The page to get the link for.
@param string $header An optional header to link to.
@return string
Gets the link for the given source file .