MediaWiki REL1_37
|
Public Member Functions | |
__toString () | |
Returns an informative human readable representation of the page identity, for use in logging and debugging. | |
createFragmentTarget ( $fragment) | |
Creates a new LinkTarget for a different fragment of the same page. | |
getDBkey () | |
Get the main part with underscores. | |
getFragment () | |
Get the link fragment (i.e. | |
getInterwiki () | |
The interwiki component of this LinkTarget. | |
getNamespace () | |
Get the namespace index. | |
getText () | |
Returns the link in text form, without namespace prefix or fragment. | |
hasFragment () | |
Whether the link target has a fragment. | |
inNamespace ( $ns) | |
Convenience function to test if it is in the namespace. | |
isExternal () | |
Whether this LinkTarget has an interwiki component. | |
isSameLinkAs (LinkTarget $other) | |
Checks whether the given LinkTarget refers to the same target as this LinkTarget. | |
Definition at line 26 of file LinkTarget.php.
MediaWiki\Linker\LinkTarget::__toString | ( | ) |
Returns an informative human readable representation of the page identity, for use in logging and debugging.
Implemented in Title, and TitleValue.
MediaWiki\Linker\LinkTarget::createFragmentTarget | ( | $fragment | ) |
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.
string | $fragment | The fragment name, or "" for the entire page. |
Implemented in Title, and TitleValue.
MediaWiki\Linker\LinkTarget::getDBkey | ( | ) |
Get the main part with underscores.
Implemented in Title, and TitleValue.
Referenced by Parser\fetchFileAndTitle(), NamespaceDupes\getAlternateTitle(), WatchedItemQueryService\getFromUntilTargetConds(), ApiQueryInfo\getVisitingWatcherInfo(), Title\isSameLinkAs(), TitleValue\isSameLinkAs(), MediaWiki\Permissions\PermissionManager\isSameSpecialPage(), Linker\makeCommentLink(), NamespaceDupes\movePage(), LanguageConverter\updateConversionTable(), and MessageCache\updateMessageOverride().
MediaWiki\Linker\LinkTarget::getFragment | ( | ) |
Get the link fragment (i.e.
the bit after the #) in text form.
Implemented in Title, and TitleValue.
Referenced by Title\isSameLinkAs(), TitleValue\isSameLinkAs(), Linker\makeCommentLink(), and Title\newFromLinkTarget().
MediaWiki\Linker\LinkTarget::getInterwiki | ( | ) |
The interwiki component of this LinkTarget.
Implemented in Title, and TitleValue.
Referenced by NamespaceInfo\canHaveTalkPage(), Title\isSameLinkAs(), TitleValue\isSameLinkAs(), and Title\newFromLinkTarget().
MediaWiki\Linker\LinkTarget::getNamespace | ( | ) |
Get the namespace index.
Implemented in Title, and TitleValue.
Referenced by NamespaceInfo\canHaveTalkPage(), NamespaceDupes\getAlternateTitle(), WatchedItemQueryService\getFromUntilTargetConds(), ApiQueryInfo\getVisitingWatcherInfo(), Title\isSameLinkAs(), TitleValue\isSameLinkAs(), MediaWiki\Permissions\PermissionManager\isSameSpecialPage(), Linker\makeCommentLink(), NamespaceDupes\movePage(), Title\newFromLinkTarget(), and LanguageConverter\updateConversionTable().
MediaWiki\Linker\LinkTarget::getText | ( | ) |
Returns the link in text form, without namespace prefix or fragment.
This is computed from the DB key by replacing any underscores with spaces.
Implemented in Title, and TitleValue.
Referenced by NamespaceInfo\canHaveTalkPage(), Parser\makeImage(), and Title\newFromLinkTarget().
MediaWiki\Linker\LinkTarget::hasFragment | ( | ) |
Whether the link target has a fragment.
Implemented in Title, and TitleValue.
Referenced by MediaWiki\Linker\LinkRenderer\getLinkText().
MediaWiki\Linker\LinkTarget::inNamespace | ( | $ns | ) |
Convenience function to test if it is in the namespace.
int | $ns |
Implemented in Title, and TitleValue.
MediaWiki\Linker\LinkTarget::isExternal | ( | ) |
Whether this LinkTarget has an interwiki component.
Implemented in Title, and TitleValue.
Referenced by Linker\makeCommentLink().
MediaWiki\Linker\LinkTarget::isSameLinkAs | ( | LinkTarget | $other | ) |
Checks whether the given LinkTarget refers to the same target as this LinkTarget.
Two link targets are considered the same if they have the same interwiki prefix, the same namespace ID, the same text, and the same fragment.
LinkTarget | $other |
Implemented in Title, and TitleValue.
Referenced by Parser\fetchFileAndTitle().