[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
A codec for %MediaWiki page titles. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Author: | Daniel Kinzler |
License: | GPL 2+ |
File Size: | 400 lines (13 kb) |
Included or required: | 0 times |
Referenced: | 1 time |
Includes or requires: | 0 files |
MediaWikiTitleCodec:: (8 methods):
__construct()
getNamespaceName()
formatTitle()
parseTitle()
getText()
getPrefixedText()
getFullText()
splitTitleString()
Class: MediaWikiTitleCodec - X-Ref
A codec for %MediaWiki page titles.__construct( Language $language, GenderCache $genderCache,$localInterwikis = array() X-Ref |
param: Language $language The language object to use for localizing namespace names. param: GenderCache $genderCache The gender cache for generating gendered namespace names param: string[]|string $localInterwikis |
getNamespaceName( $namespace, $text ) X-Ref |
param: int $namespace param: string $text return: string |
formatTitle( $namespace, $text, $fragment = '' ) X-Ref |
param: int|bool $namespace The namespace ID (or false, if the namespace should be ignored) param: string $text The page title. Should be valid. Only minimal normalization is applied. param: string $fragment The fragment name (may be empty). return: string |
parseTitle( $text, $defaultNamespace ) X-Ref |
Parses the given text and constructs a TitleValue. Normalization is applied according to the rules appropriate for the form specified by $form. param: string $text The text to parse param: int $defaultNamespace Namespace to assume per default (usually NS_MAIN) return: TitleValue |
getText( TitleValue $title ) X-Ref |
param: TitleValue $title return: string $title->getText() |
getPrefixedText( TitleValue $title ) X-Ref |
param: TitleValue $title return: string |
getFullText( TitleValue $title ) X-Ref |
param: TitleValue $title return: string |
splitTitleString( $text, $defaultNamespace = NS_MAIN ) X-Ref |
Normalizes and splits a title string. This function removes illegal characters, splits off the interwiki and namespace prefixes, sets the other forms, and canonicalizes everything. param: string $text param: int $defaultNamespace return: array A mapp with the fields 'interwiki', 'fragment', 'namespace', |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |