Merge "Simplify checking for widgets on special block page"
[lhc/web/wiklou.git] / includes / title / TitleFormatter.php
index 4edc5db..8859066 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,9 +18,9 @@
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
- * @license GPL 2+
  * @author Daniel Kinzler
  */
+use MediaWiki\Linker\LinkTarget;
 
 /**
  * A title formatter service for MediaWiki.
@@ -41,15 +41,16 @@ 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.
+        * @note Consider using LinkTarget::getText() directly, it's identical.
         *
         * @param LinkTarget $title The title to format
         *
@@ -66,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.
         *