MediaWiki  REL1_19
WikiMap Class Reference

Helper tools for dealing with other locally-hosted wikis. More...

List of all members.

Static Public Member Functions

static foreignUserLink ($wikiID, $user, $text=null)
 Convenience to get a link to a user page on a foreign wiki.
static getForeignURL ($wikiID, $page)
 Convenience to get a url to a page on a foreign wiki.
static getWiki ($wikiID)
 Get a WikiReference object for $wikiID.
static getWikiName ($wikiID)
 Convenience to get the wiki's display name.
static makeForeignLink ($wikiID, $page, $text=null)
 Convenience to get a link to a page on a foreign wiki.

Detailed Description

Helper tools for dealing with other locally-hosted wikis.

Definition at line 6 of file WikiMap.php.


Member Function Documentation

static WikiMap::foreignUserLink ( wikiID,
user,
text = null 
) [static]

Convenience to get a link to a user page on a foreign wiki.

Parameters:
$wikiIDString: wiki'd id (generally database name)
$userString: user name (must be normalised before calling this function!)
$textString: link's text; optional, default to "User:$user"
Returns:
String: HTML link or false if the wiki was not found

Definition at line 56 of file WikiMap.php.

References makeForeignLink().

Referenced by LogPage\getTitleLink().

Here is the call graph for this function:

Here is the caller graph for this function:

static WikiMap::getForeignURL ( wikiID,
page 
) [static]

Convenience to get a url to a page on a foreign wiki.

Parameters:
$wikiIDString: wiki'd id (generally database name)
$pageString: page name (must be normalised before calling this function!)
Returns:
String: URL or false if the wiki was not found

Definition at line 88 of file WikiMap.php.

References $page, and getWiki().

Referenced by makeForeignLink().

Here is the call graph for this function:

Here is the caller graph for this function:

static WikiMap::getWiki ( wikiID) [static]

Get a WikiReference object for $wikiID.

Parameters:
$wikiIDString: wiki'd id (generally database name)
Returns:
WikiReference object or null if the wiki was not found

Definition at line 14 of file WikiMap.php.

References $path.

Referenced by getForeignURL(), and getWikiName().

Here is the caller graph for this function:

static WikiMap::getWikiName ( wikiID) [static]

Convenience to get the wiki's display name.

Todo:
We can give more info than just the wiki id!
Parameters:
$wikiIDString: wiki'd id (generally database name)
Returns:
Wiki's name or $wiki_id if the wiki was not found

Definition at line 39 of file WikiMap.php.

References getWiki().

Here is the call graph for this function:

static WikiMap::makeForeignLink ( wikiID,
page,
text = null 
) [static]

Convenience to get a link to a page on a foreign wiki.

Parameters:
$wikiIDString: wiki'd id (generally database name)
$pageString: page name (must be normalised before calling this function!)
$textString: link's text; optional, default to $page
Returns:
String: HTML link or false if the wiki was not found

Definition at line 68 of file WikiMap.php.

References $page, $url, getForeignURL(), and Linker\makeExternalLink().

Referenced by foreignUserLink().

Here is the call graph for this function:

Here is the caller graph for this function:


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