MediaWiki
REL1_24
|
Represents a page (or page fragment) title within MediaWiki. More...
Public Member Functions | |
__construct ($namespace, $dbkey, $fragment= '') | |
Constructs a TitleValue. | |
__toString () | |
Returns a string representation of the title, for logging. | |
createFragmentTitle ($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 () | |
getNamespace () | |
getText () | |
Returns the title in text form, without namespace prefix or fragment. | |
Protected Attributes | |
string | $dbkey |
string | $fragment |
int | $namespace |
Represents a page (or page fragment) title within MediaWiki.
Definition at line 36 of file TitleValue.php.
TitleValue::__construct | ( | $ | namespace, |
$ | dbkey, | ||
$ | fragment = '' |
||
) |
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. |
InvalidArgumentException |
Definition at line 65 of file TitleValue.php.
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.
Definition at line 149 of file TitleValue.php.
TitleValue::createFragmentTitle | ( | $ | fragment | ) |
Creates a new TitleValue for a different fragment of the same page.
string | $fragment | The fragment name, or "" for the entire page. |
Definition at line 138 of file TitleValue.php.
Referenced by TitleValueTest\testCreateFragmentTitle().
Returns the title's DB key, as supplied to the constructor, without namespace prefix or fragment.
Definition at line 112 of file TitleValue.php.
Definition at line 102 of file TitleValue.php.
Referenced by TitleTest\testNewFromTitleValue().
Definition at line 95 of file TitleValue.php.
Referenced by TitleValueTest\testCreateFragmentTitle(), and TitleTest\testNewFromTitleValue().
Returns the title in text form, without namespace prefix or fragment.
This is computed from the DB key by replacing any underscores with spaces.
Definition at line 127 of file TitleValue.php.
Referenced by TitleValueTest\testCreateFragmentTitle(), and TitleTest\testNewFromTitleValue().
string TitleValue::$dbkey [protected] |
Definition at line 43 of file TitleValue.php.
string TitleValue::$fragment [protected] |
Definition at line 47 of file TitleValue.php.
int TitleValue::$namespace [protected] |
Definition at line 39 of file TitleValue.php.