Merge "Move methods for handling external usernames to a dedicated class"
[lhc/web/wiklou.git] / includes / title / TitleFormatter.php
index 96f396c..4551d75 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * A title formatter service for %MediaWiki.
+ * 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
@@ -18,7 +18,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
- * @license GPL 2+
  * @author Daniel Kinzler
  */
 use MediaWiki\Linker\LinkTarget;
@@ -42,10 +41,11 @@ 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.
@@ -67,6 +67,18 @@ interface TitleFormatter {
         */
        public function getPrefixedText( LinkTarget $title );
 
+       /**
+        * Return the title in prefixed database key form, with interwiki
+        * and namespace.
+        *
+        * @since 1.27
+        *
+        * @param LinkTarget $target
+        *
+        * @return string
+        */
+       public function getPrefixedDBkey( LinkTarget $target );
+
        /**
         * Returns the title formatted for display, with namespace and fragment.
         *