MediaWiki  REL1_19
WikiReference Class Reference

Reference to a locally-hosted wiki. More...

List of all members.

Public Member Functions

 __construct ($major, $minor, $canonicalServer, $path, $server=null)
 getCanonicalUrl ($page)
 Get a canonical (i.e.
 getDisplayName ()
 Get the the URL in a way to de displayed to the user More or less Wikimedia specific.
 getFullUrl ($page)
 Get a URL based on $wgServer, like Title::getFullUrl() would produce when called locally on the wiki.
 getHostname ()
 getUrl ($page)
 Alias for getCanonicalUrl(), for backwards compatibility.

Private Member Functions

 getLocalUrl ($page)
 Helper function for getUrl()

Private Attributes

 $mCanonicalServer
 canonical server URL, e.g. 'http://www.mediawiki.org'
 $mMajor
 'wiki', 'wiktionary', etc
 $mMinor
 'en', 'meta', 'mediawiki', etc
 $mPath
 path, '/wiki/$1'
 $mServer
 server URL, may be protocol-relative, e.g. '//www.mediawiki.org'

Detailed Description

Reference to a locally-hosted wiki.

Definition at line 102 of file WikiMap.php.


Constructor & Destructor Documentation

WikiReference::__construct ( major,
minor,
canonicalServer,
path,
server = null 
)

Definition at line 109 of file WikiMap.php.

References $path.


Member Function Documentation

Get a canonical (i.e.

based on $wgCanonicalServer) URL to a page on this foreign wiki

Parameters:
$pageString: page name (must be normalised before calling this function!)
Returns:
String: Url

Definition at line 165 of file WikiMap.php.

References $page, and getLocalUrl().

Referenced by getUrl().

Here is the call graph for this function:

Here is the caller graph for this function:

Get the the URL in a way to de displayed to the user More or less Wikimedia specific.

Returns:
String

Definition at line 137 of file WikiMap.php.

References $url, getUrl(), and wfParseUrl().

Here is the call graph for this function:

Get a URL based on $wgServer, like Title::getFullUrl() would produce when called locally on the wiki.

Parameters:
$pageString: page name (must be normalized before calling this function!)
Returns:
String: URL

Definition at line 184 of file WikiMap.php.

References $page, and getLocalUrl().

Here is the call graph for this function:

Returns:
string
Exceptions:
MWException

Definition at line 121 of file WikiMap.php.

WikiReference::getLocalUrl ( page) [private]

Helper function for getUrl()

Todo:
FIXME: This may be generalized...
Parameters:
$pageString: page name (must be normalised before calling this function!)
Returns:
String: Url fragment

Definition at line 155 of file WikiMap.php.

References $page.

Referenced by getCanonicalUrl(), and getFullUrl().

Here is the caller graph for this function:

WikiReference::getUrl ( page)

Alias for getCanonicalUrl(), for backwards compatibility.

Returns:
String

Definition at line 173 of file WikiMap.php.

References $page, and getCanonicalUrl().

Referenced by getDisplayName().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

WikiReference::$mCanonicalServer [private]

canonical server URL, e.g. 'http://www.mediawiki.org'

Definition at line 105 of file WikiMap.php.

WikiReference::$mMajor [private]

'wiki', 'wiktionary', etc

Definition at line 104 of file WikiMap.php.

WikiReference::$mMinor [private]

'en', 'meta', 'mediawiki', etc

Definition at line 103 of file WikiMap.php.

WikiReference::$mPath [private]

path, '/wiki/$1'

Definition at line 107 of file WikiMap.php.

WikiReference::$mServer [private]

server URL, may be protocol-relative, e.g. '//www.mediawiki.org'

Definition at line 106 of file WikiMap.php.


The documentation for this class was generated from the following file: