MediaWiki master
TitleFormatter.php
Go to the documentation of this file.
1<?php
24namespace MediaWiki\Title;
25
28
38interface TitleFormatter {
52 public function formatTitle( $namespace, $text, $fragment = '', $interwiki = '' );
53
61 public function getText( $title );
62
70 public function getPrefixedText( $title );
71
82 public function getPrefixedDBkey( $target );
83
91 public function getFullText( $title );
92
104 public function getNamespaceName( $namespace, $text );
105}
106
108class_alias( TitleFormatter::class, 'TitleFormatter' );
Represents the target of a wiki link.
Interface for objects (potentially) representing a page that can be viewable and linked to on a wiki.
A title formatter service for MediaWiki.
getNamespaceName( $namespace, $text)
Returns the name of the namespace for the given title.
getPrefixedText( $title)
Returns the title formatted for display, including the namespace name.
formatTitle( $namespace, $text, $fragment='', $interwiki='')
Returns the title formatted for display.
getFullText( $title)
Returns the title formatted for display, with namespace and fragment.
getText( $title)
Returns the title text formatted for display, without namespace or fragment.
getPrefixedDBkey( $target)
Return the title in prefixed database key form, with interwiki and namespace.