X-Git-Url: https://git.cyclocoop.org/%28%28?a=blobdiff_plain;f=includes%2Flinker%2FLinkTarget.php;h=56407aec361f66105d7fd3e8c406c00072a0a427;hb=bee9f4db96b4aec51feeddb8ccdca353c034f12f;hp=da48e00a99b876ce7295f61f351f050969406cad;hpb=baad58579945c852250e7cac74ba796db2f78347;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/linker/LinkTarget.php b/includes/linker/LinkTarget.php index da48e00a99..56407aec36 100644 --- a/includes/linker/LinkTarget.php +++ b/includes/linker/LinkTarget.php @@ -16,7 +16,6 @@ * http://www.gnu.org/copyleft/gpl.html * * @file - * @license GPL 2+ * @author Addshore */ namespace MediaWiki\Linker; @@ -28,6 +27,7 @@ interface LinkTarget { /** * Get the namespace index. + * @since 1.27 * * @return int Namespace index */ @@ -35,6 +35,7 @@ interface LinkTarget { /** * Convenience function to test if it is in the namespace + * @since 1.27 * * @param int $ns * @return bool @@ -43,6 +44,7 @@ interface LinkTarget { /** * Get the link fragment (i.e. the bit after the #) in text form. + * @since 1.27 * * @return string link fragment */ @@ -50,6 +52,7 @@ interface LinkTarget { /** * Whether the link target has a fragment + * @since 1.27 * * @return bool */ @@ -57,6 +60,7 @@ interface LinkTarget { /** * Get the main part with underscores. + * @since 1.27 * * @return string Main part of the link, with underscores (for use in href attributes) */ @@ -64,8 +68,8 @@ interface LinkTarget { /** * Returns the link in text form, without namespace prefix or fragment. - * * This is computed from the DB key by replacing any underscores with spaces. + * @since 1.27 * * @return string */ @@ -75,6 +79,7 @@ interface LinkTarget { * Creates a new LinkTarget for a different fragment of the same page. * It is expected that the same type of object will be returned, but the * only requirement is that it is a LinkTarget. + * @since 1.27 * * @param string $fragment The fragment name, or "" for the entire page. * @@ -84,6 +89,7 @@ interface LinkTarget { /** * Whether this LinkTarget has an interwiki component + * @since 1.27 * * @return bool */ @@ -91,8 +97,20 @@ interface LinkTarget { /** * The interwiki component of this LinkTarget + * @since 1.27 * * @return string */ public function getInterwiki(); + + /** + * Returns an informative human readable representation of the link target, + * for use in logging and debugging. There is no requirement for the return + * value to have any relationship with the input of TitleParser. + * @since 1.31 + * + * @return string + */ + public function __toString(); + }