MediaWiki REL1_33
|
Reference to a locally-hosted wiki. More...
Public Member Functions | |
__construct ( $canonicalServer, $path, $server=null) | |
getCanonicalServer () | |
Get a canonical server URL. | |
getCanonicalUrl ( $page, $fragmentId=null) | |
Get a canonical (i.e. | |
getDisplayName () | |
Get the URL in a way to be displayed to the user More or less Wikimedia specific. | |
getFullUrl ( $page, $fragmentId=null) | |
Get a URL based on $wgServer, like Title::getFullURL() would produce when called locally on the wiki. | |
getUrl ( $page, $fragmentId=null) | |
Alias for getCanonicalUrl(), for backwards compatibility. | |
Private Member Functions | |
getLocalUrl ( $page, $fragmentId=null) | |
Helper function for getUrl() | |
Private Attributes | |
$mCanonicalServer | |
canonical server URL, e.g. 'https://www.mediawiki.org' | |
$mPath | |
path, '/wiki/$1' | |
$mServer | |
server URL, may be protocol-relative, e.g. '//www.mediawiki.org' | |
Reference to a locally-hosted wiki.
Definition at line 26 of file WikiReference.php.
WikiReference::__construct | ( | $canonicalServer, | |
$path, | |||
$server = null |
|||
) |
string | $canonicalServer | |
string | $path | |
null | string | $server |
Definition at line 36 of file WikiReference.php.
References $path.
WikiReference::getCanonicalServer | ( | ) |
Get a canonical server URL.
Definition at line 96 of file WikiReference.php.
References $mCanonicalServer.
WikiReference::getCanonicalUrl | ( | $page, | |
$fragmentId = null |
|||
) |
Get a canonical (i.e.
based on $wgCanonicalServer) URL to a page on this foreign wiki
string | $page | Page name (must be normalised before calling this function!) |
string | null | $fragmentId |
Definition at line 88 of file WikiReference.php.
References getLocalUrl().
Referenced by getUrl().
WikiReference::getDisplayName | ( | ) |
Get the URL in a way to be displayed to the user More or less Wikimedia specific.
Definition at line 48 of file WikiReference.php.
References $mCanonicalServer, and wfParseUrl().
WikiReference::getFullUrl | ( | $page, | |
$fragmentId = null |
|||
) |
Get a URL based on $wgServer, like Title::getFullURL() would produce when called locally on the wiki.
string | $page | Page name (must be normalized before calling this function!) |
string | null | $fragmentId |
Definition at line 120 of file WikiReference.php.
References getLocalUrl().
|
private |
Helper function for getUrl()
string | $page | Page name (must be normalised before calling this function! May contain a section part.) |
string | null | $fragmentId |
Definition at line 70 of file WikiReference.php.
References wfUrlencode().
Referenced by getCanonicalUrl(), and getFullUrl().
WikiReference::getUrl | ( | $page, | |
$fragmentId = null |
|||
) |
Alias for getCanonicalUrl(), for backwards compatibility.
string | $page | |
string | null | $fragmentId |
Definition at line 107 of file WikiReference.php.
References getCanonicalUrl().
|
private |
canonical server URL, e.g. 'https://www.mediawiki.org'
Definition at line 27 of file WikiReference.php.
Referenced by getCanonicalServer(), and getDisplayName().
|
private |
path, '/wiki/$1'
Definition at line 29 of file WikiReference.php.
|
private |
server URL, may be protocol-relative, e.g. '//www.mediawiki.org'
Definition at line 28 of file WikiReference.php.