[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/title/ -> TitleFormatter.php (summary)

A title formatter service for %MediaWiki. 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: 90 lines (3 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 1 class

TitleFormatter:: (5 methods):
  formatTitle()
  getText()
  getPrefixedText()
  getFullText()
  getNamespaceName()


Interface: TitleFormatter  - X-Ref

A title formatter service for MediaWiki.

This is designed to encapsulate knowledge about conventions for the title
forms to be used in the database, in urls, in wikitext, etc.

formatTitle( $namespace, $text, $fragment = '' )   X-Ref
Returns the title formatted for display.
Per default, this includes the namespace but not the fragment.

param: int|bool $namespace The namespace ID (or false, if the namespace should be ignored)
param: string $text The page title
param: string $fragment The fragment name (may be empty).
return: string

getText( TitleValue $title )   X-Ref
Returns the title text formatted for display, without namespace of fragment.

param: TitleValue $title The title to format
return: string

getPrefixedText( TitleValue $title )   X-Ref
Returns the title formatted for display, including the namespace name.

param: TitleValue $title The title to format
return: string

getFullText( TitleValue $title )   X-Ref
Returns the title formatted for display, with namespace and fragment.

param: TitleValue $title The title to format
return: string

getNamespaceName( $namespace, $text )   X-Ref
Returns the name of the namespace for the given title.

param: int $namespace
param: string $text
return: string



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1