And add a GPL file header while we're at it.
Change-Id: I15a6f240124c879b21fb655ade1baaebf4f34ffd
'LinkFilter' => __DIR__ . '/includes/LinkFilter.php',
'LinkHolderArray' => __DIR__ . '/includes/parser/LinkHolderArray.php',
'LinkSearchPage' => __DIR__ . '/includes/specials/SpecialLinkSearch.php',
- 'LinkTarget' => __DIR__ . '/includes/LinkTarget.php',
'Linker' => __DIR__ . '/includes/Linker.php',
'LinksDeletionUpdate' => __DIR__ . '/includes/deferred/LinksDeletionUpdate.php',
'LinksUpdate' => __DIR__ . '/includes/deferred/LinksUpdate.php',
'MediaWikiVersionFetcher' => __DIR__ . '/includes/MediaWikiVersionFetcher.php',
'MediaWiki\\Languages\\Data\\Names' => __DIR__ . '/languages/data/Names.php',
'MediaWiki\\Languages\\Data\\ZhConversion' => __DIR__ . '/languages/data/ZhConversion.php',
+ 'MediaWiki\\Linker\\LinkTarget' => __DIR__ . '/includes/linker/LinkTarget.php',
'MediaWiki\\Logger\\LegacyLogger' => __DIR__ . '/includes/debug/logger/LegacyLogger.php',
'MediaWiki\\Logger\\LegacySpi' => __DIR__ . '/includes/debug/logger/LegacySpi.php',
'MediaWiki\\Logger\\LoggerFactory' => __DIR__ . '/includes/debug/logger/LoggerFactory.php',
+++ /dev/null
-<?php
-
-/**
- * @author Addshore
- *
- * @since 1.27
- */
-interface LinkTarget {
-
- /**
- * Get the namespace index.
- *
- * @return int Namespace index
- */
- public function getNamespace();
-
- /**
- * Get the link fragment (i.e. the bit after the #) in text form.
- *
- * @return string link fragment
- */
- public function getFragment();
-
- /**
- * Whether the link target has a fragment
- *
- * @return bool
- */
- public function hasFragment();
-
- /**
- * Get the main part with underscores.
- *
- * @return string Main part of the link, with underscores (for use in href attributes)
- */
- public function getDBkey();
-
- /**
- * Returns the link in text form, without namespace prefix or fragment.
- *
- * This is computed from the DB key by replacing any underscores with spaces.
- *
- * @return string
- */
- public function getText();
-
- /**
- * 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.
- *
- * @param string $fragment The fragment name, or "" for the entire page.
- *
- * @return LinkTarget
- */
- public function createFragmentTarget( $fragment );
-}
*
* @file
*/
+use MediaWiki\Linker\LinkTarget;
/**
* Some internal bits split of from Skin.php. These functions are used
*
* @file
*/
+use MediaWiki\Linker\LinkTarget;
/**
* @todo document
*
* @file
*/
+use MediaWiki\Linker\LinkTarget;
/**
* Represents a title within MediaWiki.
* @file
* @ingroup Watchlist
*/
+use MediaWiki\Linker\LinkTarget;
/**
* Representation of a pair of user and title for watchlist entries.
<?php
use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
+use MediaWiki\Linker\LinkTarget;
use Wikimedia\Assert\Assert;
/**
*
* @file
*/
+use MediaWiki\Linker\LinkTarget;
/**
* A query module to show basic page information.
* @file
* @ingroup Cache
*/
+use MediaWiki\Linker\LinkTarget;
/**
* Class representing a list of titles
--- /dev/null
+<?php
+/**
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @license GPL 2+
+ * @author Addshore
+ */
+namespace MediaWiki\Linker;
+
+/**
+ * @since 1.27
+ */
+interface LinkTarget {
+
+ /**
+ * Get the namespace index.
+ *
+ * @return int Namespace index
+ */
+ public function getNamespace();
+
+ /**
+ * Get the link fragment (i.e. the bit after the #) in text form.
+ *
+ * @return string link fragment
+ */
+ public function getFragment();
+
+ /**
+ * Whether the link target has a fragment
+ *
+ * @return bool
+ */
+ public function hasFragment();
+
+ /**
+ * Get the main part with underscores.
+ *
+ * @return string Main part of the link, with underscores (for use in href attributes)
+ */
+ public function getDBkey();
+
+ /**
+ * Returns the link in text form, without namespace prefix or fragment.
+ *
+ * This is computed from the DB key by replacing any underscores with spaces.
+ *
+ * @return string
+ */
+ public function getText();
+
+ /**
+ * 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.
+ *
+ * @param string $fragment The fragment name, or "" for the entire page.
+ *
+ * @return LinkTarget
+ */
+ public function createFragmentTarget( $fragment );
+}
* @author Tim Starling
* @author Luke Welling lwelling@wikimedia.org
*/
+use MediaWiki\Linker\LinkTarget;
/**
* This module processes the email notifications when the current page is
/**
* @defgroup Watchlist Users watchlist handling
*/
+use MediaWiki\Linker\LinkTarget;
/**
* Implements Special:EditWatchlist
* @license GPL 2+
* @author Daniel Kinzler
*/
+use MediaWiki\Linker\LinkTarget;
/**
* A service for generating links from page titles.
* @license GPL 2+
* @author Daniel Kinzler
*/
+use MediaWiki\Linker\LinkTarget;
/**
* A codec for %MediaWiki page titles.
* @license GPL 2+
* @author Daniel Kinzler
*/
+use MediaWiki\Linker\LinkTarget;
/**
* Represents a link rendering service for %MediaWiki.
* @license GPL 2+
* @author Daniel Kinzler
*/
+use MediaWiki\Linker\LinkTarget;
/**
* A title formatter service for MediaWiki.
* @license GPL 2+
* @author Daniel Kinzler
*/
+use MediaWiki\Linker\LinkTarget;
use Wikimedia\Assert\Assert;
/**
* @ingroup Maintenance
*/
+use MediaWiki\Linker\LinkTarget;
+
require_once __DIR__ . '/Maintenance.php';
/**
<?php
+use MediaWiki\Linker\LinkTarget;
/**
* @author Addshore
<?php
+use MediaWiki\Linker\LinkTarget;
/**
* @author Addshore