MediaWiki  master
MediaWiki\WikiMap\WikiReference Class Reference

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

Public Member Functions

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

Detailed Description

Reference to a locally-hosted wiki.

Definition at line 28 of file WikiReference.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\WikiMap\WikiReference::__construct (   $canonicalServer,
  $path,
  $server = null 
)
Parameters
string$canonicalServer
string$path
null | string$server

Definition at line 38 of file WikiReference.php.

References $path.

Member Function Documentation

◆ getCanonicalServer()

MediaWiki\WikiMap\WikiReference::getCanonicalServer ( )

Get a canonical server URL.

Returns
string

Definition at line 98 of file WikiReference.php.

◆ getCanonicalUrl()

MediaWiki\WikiMap\WikiReference::getCanonicalUrl (   $page,
  $fragmentId = null 
)

Get a canonical (i.e.

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

Parameters
string$pagePage name (must be normalised before calling this function!)
string | null$fragmentId
Returns
string Url

Definition at line 90 of file WikiReference.php.

Referenced by MediaWiki\WikiMap\WikiReference\getUrl().

◆ getDisplayName()

MediaWiki\WikiMap\WikiReference::getDisplayName ( )

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

Returns
string

Definition at line 50 of file WikiReference.php.

References wfParseUrl().

◆ getFullUrl()

MediaWiki\WikiMap\WikiReference::getFullUrl (   $page,
  $fragmentId = null 
)

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

Parameters
string$pagePage name (must be normalized before calling this function!)
string | null$fragmentId
Returns
string URL

Definition at line 122 of file WikiReference.php.

◆ getUrl()

MediaWiki\WikiMap\WikiReference::getUrl (   $page,
  $fragmentId = null 
)

Alias for getCanonicalUrl(), for backwards compatibility.

Parameters
string$page
string | null$fragmentId
Returns
string

Definition at line 109 of file WikiReference.php.

References MediaWiki\WikiMap\WikiReference\getCanonicalUrl().


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