- public function createFragmentTitle( $fragment ) {
- return new TitleValue( $this->namespace, $this->dbkey, $fragment );
+ public function createFragmentTarget( $fragment ) {
+ return new TitleValue(
+ $this->namespace,
+ $this->dbkey,
+ $fragment,
+ $this->interwiki
+ );
+ }
+
+ /**
+ * Whether it has an interwiki part
+ *
+ * @since 1.27
+ * @return bool
+ */
+ public function isExternal() {
+ return $this->interwiki !== '';
+ }
+
+ /**
+ * Returns the interwiki part
+ *
+ * @since 1.27
+ * @return string
+ */
+ public function getInterwiki() {
+ return $this->interwiki;