MediaWiki
1.32.5
|
Public Member Functions | |
__toString () | |
Returns an informative human readable representation of the link target, for use in logging and debugging. More... | |
createFragmentTarget ( $fragment) | |
Creates a new LinkTarget for a different fragment of the same page. More... | |
getDBkey () | |
Get the main part with underscores. More... | |
getFragment () | |
Get the link fragment (i.e. More... | |
getInterwiki () | |
The interwiki component of this LinkTarget. More... | |
getNamespace () | |
Get the namespace index. More... | |
getText () | |
Returns the link in text form, without namespace prefix or fragment. More... | |
hasFragment () | |
Whether the link target has a fragment. More... | |
inNamespace ( $ns) | |
Convenience function to test if it is in the namespace. More... | |
isExternal () | |
Whether this LinkTarget has an interwiki component. More... | |
Definition at line 26 of file LinkTarget.php.
MediaWiki\Linker\LinkTarget::__toString | ( | ) |
Returns an informative human readable representation of the link target, for use in logging and debugging.
There is no requirement for the return value to have any relationship with the input of TitleParser.
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.
Referenced by MediaWiki\Linker\LinkRenderer\makeBrokenLink().
MediaWiki\Linker\LinkTarget::getDBkey | ( | ) |
Get the main part with underscores.
Implemented in Title, and TitleValue.
Referenced by LinkCache\addLinkObj(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertLinkTargetsEqual(), WatchedItemStore\countVisitingWatchers(), WatchedItemStore\countWatchers(), WatchedItemStore\dbCond(), WatchedItemStore\duplicateEntry(), LinkCache\fetchPageRow(), NamespaceDupes\getAlternateTitle(), WatchedItemStore\getCacheKey(), WatchedItemQueryService\getFromUntilTargetConds(), MediaWikiTitleCodec\getPrefixedDBkey(), ApiQueryInfo\getVisitingWatcherInfo(), Linker\makeCommentLink(), NamespaceDupes\movePage(), Linker\normaliseSpecialPage(), WatchedItemStore\removeWatch(), WatchedItemStoreUnitTest\testDuplicateAllAssociatedEntries_somethingToDuplicate(), WatchedItemStore\uncache(), WatchedItemStore\uncacheLinkTarget(), WatchedItemStore\updateNotificationTimestamp(), and WatchedItemStoreUnitTest\verifyCallbackJob().
MediaWiki\Linker\LinkTarget::getFragment | ( | ) |
Get the link fragment (i.e.
the bit after the #) in text form.
Implemented in Title, and TitleValue.
Referenced by MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertLinkTargetsEqual(), MediaWiki\Linker\LinkRenderer\getLinkText(), Linker\makeCommentLink(), Title\newFromLinkTarget(), and Linker\normaliseSpecialPage().
MediaWiki\Linker\LinkTarget::getInterwiki | ( | ) |
The interwiki component of this LinkTarget.
Implemented in Title, and TitleValue.
Referenced by MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertLinkTargetsEqual(), MediaWikiTitleCodec\getPrefixedDBkey(), and Title\newFromLinkTarget().
MediaWiki\Linker\LinkTarget::getNamespace | ( | ) |
Get the namespace index.
Implemented in Title, and TitleValue.
Referenced by LinkCache\addLinkObj(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase\assertLinkTargetsEqual(), Title\compare(), WatchedItemStore\countVisitingWatchers(), WatchedItemStore\countWatchers(), WatchedItemStore\dbCond(), WatchedItemStore\duplicateEntry(), LinkCache\fetchPageRow(), NamespaceDupes\getAlternateTitle(), WatchedItemStore\getCacheKey(), WatchedItemQueryService\getFromUntilTargetConds(), MediaWikiTitleCodec\getFullText(), MediaWiki\Linker\LinkRenderer\getLinkClasses(), MediaWikiTitleCodec\getPrefixedDBkey(), MediaWikiTitleCodec\getPrefixedText(), ApiQueryInfo\getVisitingWatcherInfo(), MediaWikiGadgetsDefinitionRepo\handlePageUpdate(), MediaWiki\Linker\LinkRenderer\makeBrokenLink(), Linker\makeCommentLink(), NamespaceDupes\movePage(), Title\newFromLinkTarget(), Linker\normaliseSpecialPage(), WatchedItemStore\removeWatch(), WatchedItemStoreUnitTest\testDuplicateAllAssociatedEntries_somethingToDuplicate(), WatchedItemStore\uncache(), WatchedItemStore\uncacheLinkTarget(), WatchedItemStore\updateNotificationTimestamp(), and WatchedItemStoreUnitTest\verifyCallbackJob().
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 Title\compare(), GadgetDefinitionNamespaceRepo\handlePageDeletion(), MediaWikiGadgetsDefinitionRepo\handlePageUpdate(), GadgetDefinitionNamespaceRepo\handlePageUpdate(), 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(), and MediaWiki\Linker\LinkRenderer\makeBrokenLink().
MediaWiki\Linker\LinkTarget::inNamespace | ( | $ns | ) |
Convenience function to test if it is in the namespace.
int | $ns |
Implemented in Title, and TitleValue.
Referenced by LinkCache\addLinkObj(), GadgetDefinitionNamespaceRepo\handlePageCreation(), GadgetDefinitionNamespaceRepo\handlePageDeletion(), and GadgetDefinitionNamespaceRepo\handlePageUpdate().
MediaWiki\Linker\LinkTarget::isExternal | ( | ) |
Whether this LinkTarget has an interwiki component.
Implemented in Title, and TitleValue.
Referenced by LinkCache\addLinkObj(), Linker\makeCommentLink(), MediaWiki\Linker\LinkRenderer\makeKnownLink(), and Linker\normaliseSpecialPage().