BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
MediaWiki\Linker\LinkTarget Interface Reference
Inheritance diagram for MediaWiki\Linker\LinkTarget:

Public Member Functions

 getNamespace ()
 
 inNamespace ($ns)
 
 getFragment ()
 
 hasFragment ()
 
 getDBkey ()
 
 getText ()
 
 createFragmentTarget ($fragment)
 
 isExternal ()
 
 getInterwiki ()
 

Detailed Description

Since
1.27

Member Function Documentation

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.

Parameters
string$fragmentThe fragment name, or "" for the entire page.
Returns
LinkTarget

Implemented in Title, and TitleValue.

MediaWiki\Linker\LinkTarget::getDBkey ( )

Get the main part with underscores.

Returns
string Main part of the link, with underscores (for use in href attributes)

Implemented in Title, and TitleValue.

MediaWiki\Linker\LinkTarget::getFragment ( )

Get the link fragment (i.e. the bit after the #) in text form.

Returns
string link fragment

Implemented in Title, and TitleValue.

MediaWiki\Linker\LinkTarget::getInterwiki ( )

The interwiki component of this LinkTarget

Returns
string

Implemented in Title, and TitleValue.

MediaWiki\Linker\LinkTarget::getNamespace ( )

Get the namespace index.

Returns
int Namespace index

Implemented in Title, and TitleValue.

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.

Returns
string

Implemented in Title, and TitleValue.

MediaWiki\Linker\LinkTarget::hasFragment ( )

Whether the link target has a fragment

Returns
bool

Implemented in Title, and TitleValue.

MediaWiki\Linker\LinkTarget::inNamespace (   $ns)

Convenience function to test if it is in the namespace

Parameters
int$ns
Returns
bool

Implemented in Title, and TitleValue.

MediaWiki\Linker\LinkTarget::isExternal ( )

Whether this LinkTarget has an interwiki component

Returns
bool

Implemented in Title, and TitleValue.


The documentation for this interface was generated from the following file: