MediaWiki
REL1_41
LinkTarget.php
Go to the documentation of this file.
1
<?php
21
namespace
MediaWiki\Linker
;
22
30
interface
LinkTarget
{
31
38
public
function
getNamespace
(): int;
39
47
public
function
inNamespace
(
int
$ns ): bool;
48
55
public
function
getFragment
(): string;
56
63
public
function
hasFragment
(): bool;
64
75
public
function
getDBkey
(): string;
76
91
public
function
getText
(): string;
92
103
public
function
createFragmentTarget
(
string
$fragment );
104
111
public
function
isExternal
(): bool;
112
119
public
function
getInterwiki
(): string;
120
131
public
function
isSameLinkAs
(
LinkTarget
$other ): bool;
132
139
public
function
__toString
(): string;
140
141
}
MediaWiki\Linker\LinkTarget
Represents the target of a wiki link.
Definition
LinkTarget.php:30
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
Definition
DummyLinker.php:3
includes
linker
LinkTarget.php
Generated on Wed Nov 27 2024 07:24:00 for MediaWiki by
1.10.0