MediaWiki REL1_31
|
Represents a page (or page fragment) title within MediaWiki. More...
Public Member Functions | |
__construct ( $namespace, $dbkey, $fragment='', $interwiki='') | |
Constructs a TitleValue. | |
__toString () | |
Returns a string representation of the title, for logging. | |
createFragmentTarget ( $fragment) | |
Creates a new TitleValue for a different fragment of the same page. | |
getDBkey () | |
Returns the title's DB key, as supplied to the constructor, without namespace prefix or fragment. | |
getFragment () | |
getInterwiki () | |
Returns the interwiki part. | |
getNamespace () | |
getText () | |
Returns the title in text form, without namespace prefix or fragment. | |
hasFragment () | |
inNamespace ( $ns) | |
isExternal () | |
Whether it has an interwiki part. | |
Protected Attributes | |
string | $dbkey |
string | $fragment |
string | $interwiki |
int | $namespace |
Represents a page (or page fragment) title within MediaWiki.
Definition at line 35 of file TitleValue.php.
TitleValue::__construct | ( | $namespace, | |
$dbkey, | |||
$fragment = '', | |||
$interwiki = '' ) |
Constructs a TitleValue.
int | $namespace | The namespace ID. This is not validated. |
string | $dbkey | The page title in valid DBkey form. No normalization is applied. |
string | $fragment | The fragment title. Use '' to represent the whole page. No validation or normalization is applied. |
string | $interwiki | The interwiki component |
InvalidArgumentException |
Definition at line 78 of file TitleValue.php.
TitleValue::__toString | ( | ) |
Returns a string representation of the title, for logging.
This is purely informative and must not be used programmatically. Use the appropriate TitleFormatter to generate the correct string representation for a given use.
Implements MediaWiki\Linker\LinkTarget.
Definition at line 200 of file TitleValue.php.
References $name.
TitleValue::createFragmentTarget | ( | $fragment | ) |
Creates a new TitleValue for a different fragment of the same page.
string | $fragment | The fragment name, or "" for the entire page. |
Implements MediaWiki\Linker\LinkTarget.
Definition at line 163 of file TitleValue.php.
TitleValue::getDBkey | ( | ) |
Returns the title's DB key, as supplied to the constructor, without namespace prefix or fragment.
Implements MediaWiki\Linker\LinkTarget.
Definition at line 135 of file TitleValue.php.
Referenced by getText().
TitleValue::getFragment | ( | ) |
Implements MediaWiki\Linker\LinkTarget.
Definition at line 116 of file TitleValue.php.
TitleValue::getInterwiki | ( | ) |
Returns the interwiki part.
Implements MediaWiki\Linker\LinkTarget.
Definition at line 188 of file TitleValue.php.
TitleValue::getNamespace | ( | ) |
Implements MediaWiki\Linker\LinkTarget.
Definition at line 99 of file TitleValue.php.
TitleValue::getText | ( | ) |
Returns the title in text form, without namespace prefix or fragment.
This is computed from the DB key by replacing any underscores with spaces.
Implements MediaWiki\Linker\LinkTarget.
Definition at line 151 of file TitleValue.php.
References getDBkey().
TitleValue::hasFragment | ( | ) |
Implements MediaWiki\Linker\LinkTarget.
Definition at line 124 of file TitleValue.php.
TitleValue::inNamespace | ( | $ns | ) |
int | $ns |
Implements MediaWiki\Linker\LinkTarget.
Definition at line 108 of file TitleValue.php.
TitleValue::isExternal | ( | ) |
Whether it has an interwiki part.
Implements MediaWiki\Linker\LinkTarget.
Definition at line 178 of file TitleValue.php.
|
protected |
Definition at line 47 of file TitleValue.php.
|
protected |
Definition at line 53 of file TitleValue.php.
|
protected |
Definition at line 59 of file TitleValue.php.
|
protected |
Definition at line 41 of file TitleValue.php.