Merge "Enforce load.php's no-session constraint"
[lhc/web/wiklou.git] / includes / title / TitleFormatter.php
index aad8376..c081129 100644 (file)
@@ -21,6 +21,7 @@
  * @license GPL 2+
  * @author Daniel Kinzler
  */
+use MediaWiki\Linker\LinkTarget;
 
 /**
  * A title formatter service for MediaWiki.
@@ -41,39 +42,40 @@ interface TitleFormatter {
         * @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).
+        * @param string $interwiki The interwiki prefix (may be empty).
         *
         * @return string
         */
-       public function formatTitle( $namespace, $text, $fragment = '' );
+       public function formatTitle( $namespace, $text, $fragment = '', $interwiki = '' );
 
        /**
         * Returns the title text formatted for display, without namespace of fragment.
         *
         * @note Only minimal normalization is applied. Consider using TitleValue::getText() directly.
         *
-        * @param TitleValue $title The title to format
+        * @param LinkTarget $title The title to format
         *
         * @return string
         */
-       public function getText( TitleValue $title );
+       public function getText( LinkTarget $title );
 
        /**
         * Returns the title formatted for display, including the namespace name.
         *
-        * @param TitleValue $title The title to format
+        * @param LinkTarget $title The title to format
         *
         * @return string
         */
-       public function getPrefixedText( TitleValue $title );
+       public function getPrefixedText( LinkTarget $title );
 
        /**
         * Returns the title formatted for display, with namespace and fragment.
         *
-        * @param TitleValue $title The title to format
+        * @param LinkTarget $title The title to format
         *
         * @return string
         */
-       public function getFullText( TitleValue $title );
+       public function getFullText( LinkTarget $title );
 
        /**
         * Returns the name of the namespace for the given title.