class JMediawikiLinks extends JMediawikiObject

MediaWiki API Links class for the Joomla Platform.

Methods

__construct( Registry $options = null, JMediawikiHttp $client = null)

Constructor.

string
buildParameter( array $params)

Method to build request parameters from a string array.

Object
validateResponse( JHttpresponse $response)

Method to validate response for errors

object
getLinks( array $titles, array $plnamespace = null, string $pllimit = null, string $plcontinue = null, array $pltitles = null, string $pldir = null)

Method to return all links from the given page(s).

object
getLinksUsed( array $titles)

Method to return info about the link pages.

object
getIWLinks( array $titles, boolean $iwurl = false, integer $iwlimit = null, boolean $iwcontinue = false, string $iwprefix = null, string $iwtitle = null, string $iwdir = null)

Method to return all interwiki links from the given page(s).

object
getLangLinks( array $titles, integer $lllimit = null, boolean $llcontinue = false, string $llurl = null, string $lllang = null, string $lltitle = null, string $lldir = null)

Method to return all interlanguage links from the given page(s).

object
getExtLinks( array $titles, integer $ellimit = null, string $eloffset = null, string $elprotocol = null, string $elquery = null)

Method to return all external urls from the given page(s).

object
enumerateLinks( boolean $alcontinue = false, string $alfrom = null, string $alto = null, string $alprefix = null, string $alunique = null, array $alprop = null, string $alnamespace = null, integer $allimit = null)

Method to enumerate all links that point to a given namespace.

Details

__construct( Registry $options = null, JMediawikiHttp $client = null)

Constructor.

Parameters

Registry $options Mediawiki options object.
JMediawikiHttp $client The HTTP client object.

string buildParameter( array $params)

Method to build request parameters from a string array.

Parameters

array $params string array that contains the parameters

Return Value

string request parameter

Object validateResponse( JHttpresponse $response)

Method to validate response for errors

Parameters

JHttpresponse $response reponse from the mediawiki server

Return Value

Object

Exceptions

DomainException

Method to return all links from the given page(s).

Parameters

array $titles Page titles to retrieve links.
array $plnamespace Namespaces to get links.
string $pllimit Number of links to return.
string $plcontinue Continue when more results are available.
array $pltitles List links to these titles.
string $pldir Direction of listing.

Return Value

object

object getLinksUsed( array $titles)

Method to return info about the link pages.

Parameters

array $titles Page titles to retrieve links.

Return Value

object

Method to return all interwiki links from the given page(s).

Parameters

array $titles Page titles to retrieve links.
boolean $iwurl Whether to get the full url.
integer $iwlimit Number of interwiki links to return.
boolean $iwcontinue When more results are available, use this to continue.
string $iwprefix Prefix for the interwiki.
string $iwtitle Interwiki link to search for.
string $iwdir The direction in which to list.

Return Value

object

Method to return all interlanguage links from the given page(s).

Parameters

array $titles Page titles to retrieve links.
integer $lllimit Number of language links to return.
boolean $llcontinue When more results are available, use this to continue.
string $llurl Whether to get the full URL.
string $lllang Language code.
string $lltitle Link to search for.
string $lldir The direction in which to list.

Return Value

object

Method to return all external urls from the given page(s).

Parameters

array $titles Page titles to retrieve links.
integer $ellimit Number of links to return.
string $eloffset When more results are available, use this to continue.
string $elprotocol Protocol of the url.
string $elquery Search string without protocol.

Return Value

object

Method to enumerate all links that point to a given namespace.

Parameters

boolean $alcontinue When more results are available, use this to continue.
string $alfrom Start listing at this title. The title need not exist.
string $alto The page title to stop enumerating at.
string $alprefix Search for all page titles that begin with this value.
string $alunique Only show unique links.
array $alprop What pieces of information to include.
string $alnamespace The namespace to enumerate.
integer $allimit Number of links to return.

Return Value

object