* @see https://www.mediawiki.org/wiki/Requests_for_comment/TitleValue
* @since 1.23
*/
-class TitleValue {
+class TitleValue implements LinkTarget {
/**
* @var int
*/
return $this->fragment;
}
+ /**
+ * @since 1.27
+ * @return bool
+ */
+ public function hasFragment() {
+ return $this->fragment !== '';
+ }
+
/**
* Returns the title's DB key, as supplied to the constructor,
* without namespace prefix or fragment.