wiki.techinc.nl/includes/LinkTarget.php
Kunal Mehta 55ec9f2e4d Add LinkTarget::hasFragment() helper function
LinkTarget::hasFragment() is a helper function which returns a boolean
of whether the target has a fragment. Title already had such a function,
and one was added to TitleValue.

Co-Authored-By: addshore <addshorewiki@gmail.com>
Change-Id: I49e607ae5a58c3aef96d0246297740e7d88ac816
2016-04-20 15:51:39 -07:00

47 lines
832 B
PHP

<?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();
}