MediaWiki
REL1_39
LinkTarget.php
Go to the documentation of this file.
1
<?php
21
namespace
MediaWiki\Linker
;
22
26
interface
LinkTarget
{
27
34
public
function
getNamespace
(): int;
35
43
public
function
inNamespace
(
int
$ns ): bool;
44
51
public
function
getFragment
(): string;
52
59
public
function
hasFragment
(): bool;
60
71
public
function
getDBkey
(): string;
72
87
public
function
getText
(): string;
88
99
public
function
createFragmentTarget
(
string
$fragment );
100
107
public
function
isExternal
(): bool;
108
115
public
function
getInterwiki
(): string;
116
127
public
function
isSameLinkAs
(
LinkTarget
$other ): bool;
128
135
public
function
__toString
(): string;
136
137
}
MediaWiki\Linker\LinkTarget
Definition
LinkTarget.php:26
MediaWiki\Linker\LinkTarget\inNamespace
inNamespace(int $ns)
Convenience function to check if the target is in a given namespace.
MediaWiki\Linker\LinkTarget\getInterwiki
getInterwiki()
The interwiki component of this LinkTarget.
MediaWiki\Linker\LinkTarget\hasFragment
hasFragment()
Whether the link target has a fragment.
MediaWiki\Linker\LinkTarget\__toString
__toString()
Return an informative human-readable representation of the link target, for use in logging and debugg...
MediaWiki\Linker\LinkTarget\getFragment
getFragment()
Get the link fragment in text form (i.e.
MediaWiki\Linker\LinkTarget\getNamespace
getNamespace()
Get the namespace index.
MediaWiki\Linker\LinkTarget\getDBkey
getDBkey()
Get the main part of the link target, in canonical database form.
MediaWiki\Linker\LinkTarget\isExternal
isExternal()
Whether this LinkTarget has an interwiki component.
MediaWiki\Linker\LinkTarget\getText
getText()
Get the main part of the link target, in text form.
MediaWiki\Linker\LinkTarget\isSameLinkAs
isSameLinkAs(LinkTarget $other)
Check whether the given LinkTarget refers to the same target as this LinkTarget.
MediaWiki\Linker\LinkTarget\createFragmentTarget
createFragmentTarget(string $fragment)
Create a new LinkTarget with a different fragment on the same page.
MediaWiki\Linker
includes
linker
LinkTarget.php
Generated on Mon Dec 2 2024 06:23:42 for MediaWiki by
1.10.0