MediaWiki 1.42.1
TitleFormatter.php
Go to the documentation of this file.
1<?php
24namespace MediaWiki\Title;
25
26use InvalidArgumentException;
29
39interface TitleFormatter {
53 public function formatTitle( $namespace, $text, $fragment = '', $interwiki = '' );
54
62 public function getText( $title );
63
71 public function getPrefixedText( $title );
72
83 public function getPrefixedDBkey( $target );
84
92 public function getFullText( $title );
93
106 public function getNamespaceName( $namespace, $text );
107}
108
110class_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.