Add LinkTarget::inNamespace() helper function
[lhc/web/wiklou.git] / includes / linker / LinkTarget.php
index 2764f46..da48e00 100644 (file)
@@ -33,6 +33,14 @@ interface LinkTarget {
         */
        public function getNamespace();
 
+       /**
+        * Convenience function to test if it is in the namespace
+        *
+        * @param int $ns
+        * @return bool
+        */
+       public function inNamespace( $ns );
+
        /**
         * Get the link fragment (i.e. the bit after the #) in text form.
         *
@@ -73,4 +81,18 @@ interface LinkTarget {
         * @return LinkTarget
         */
        public function createFragmentTarget( $fragment );
+
+       /**
+        * Whether this LinkTarget has an interwiki component
+        *
+        * @return bool
+        */
+       public function isExternal();
+
+       /**
+        * The interwiki component of this LinkTarget
+        *
+        * @return string
+        */
+       public function getInterwiki();
 }