Source for file links.php
Documentation is available at links.php
* @package Joomla.Platform
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* MediaWiki API Links class for the Joomla Platform.
* @package Joomla.Platform
* Method to return all links from the given page(s).
* @param array $titles Page titles to retrieve links.
* @param array $plnamespace Namespaces to get links.
* @param string $pllimit Number of links to return.
* @param string $plcontinue Continue when more results are available.
* @param array $pltitles List links to these titles.
* @param string $pldir Direction of listing.
public function getLinks(array $titles, array $plnamespace =
null, $pllimit =
null, $plcontinue =
null, array $pltitles =
null, $pldir =
null)
$path =
'?action=query&prop=links';
// Append titles to the request.
$path .=
'&titles=' .
$this->buildParameter($titles);
$path .=
'&pllimit=' .
$pllimit;
$path .=
'&plcontinue=' .
$plcontinue;
$path .=
'&pldir=' .
$pldir;
* Method to return info about the link pages.
* @param array $titles Page titles to retrieve links.
$path =
'?action=query&generator=links&prop=info';
// Append titles to the request.
$path .=
'&titles=' .
$this->buildParameter($titles);
$response =
$this->client->get($this->fetchUrl($path));
* Method to return all interwiki links from the given page(s).
* @param array $titles Page titles to retrieve links.
* @param boolean $iwurl Whether to get the full url.
* @param integer $iwlimit Number of interwiki links to return.
* @param boolean $iwcontinue When more results are available, use this to continue.
* @param string $iwprefix Prefix for the interwiki.
* @param string $iwtitle Interwiki link to search for.
* @param string $iwdir The direction in which to list.
public function getIWLinks(array $titles, $iwurl =
false, $iwlimit =
null, $iwcontinue =
false, $iwprefix =
null, $iwtitle =
null, $iwdir =
null)
$path =
'?action=query&prop=links';
// Append titles to the request.
$path .=
'&titles=' .
$this->buildParameter($titles);
$path .=
'&iwlimit=' .
$iwlimit;
$path .=
'&iwprefix=' .
$iwprefix;
$path .=
'&iwtitle=' .
$iwtitle;
$path .=
'&iwdir=' .
$iwdir;
* Method to return all interlanguage links from the given page(s).
* @param array $titles Page titles to retrieve links.
* @param integer $lllimit Number of langauge links to return.
* @param boolean $llcontinue When more results are available, use this to continue.
* @param string $llurl Whether to get the full URL.
* @param string $lllang Language code.
* @param string $lltitle Link to search for.
* @param string $lldir The direction in which to list.
public function getLangLinks(array $titles, $lllimit =
null, $llcontinue =
false, $llurl =
null, $lllang =
null, $lltitle =
null, $lldir =
null)
$path =
'?action=query&prop=langlinks';
// Append titles to the request.
$path .=
'&titles=' .
$this->buildParameter($titles);
$path .=
'&lllimit=' .
$lllimit;
$path .=
'&llurl=' .
$llurl;
$path .=
'&lllang=' .
$lllang;
$path .=
'&lltitle=' .
$lltitle;
$path .=
'&lldir=' .
$lldir;
* Method to return all external urls from the given page(s).
* @param array $titles Page titles to retrieve links.
* @param integer $ellimit Number of links to return.
* @param string $eloffset When more results are available, use this to continue.
* @param string $elprotocol Protocol of the url.
* @param string $elquery Search string without protocol.
public function getExtLinks(array $titles, $ellimit =
null, $eloffset =
null, $elprotocol =
null, $elquery =
null)
$path =
'?action=query&prop=extlinks';
// Append titles to the request.
$path .=
'&titles=' .
$this->buildParameter($titles);
$path .=
'&ellimit=' .
$ellimit;
$path .=
'&eloffset=' .
$eloffset;
$path .=
'&elprotocol=' .
$elprotocol;
$path .=
'&elquery=' .
$elquery;
* Method to enumerate all links that point to a given namespace.
* @param boolean $alcontinue When more results are available, use this to continue.
* @param string $alfrom Start listing at this title. The title need not exist.
* @param string $alto The page title to stop enumerating at.
* @param string $alprefix Search for all page titles that begin with this value.
* @param string $alunique Only show unique links.
* @param array $alprop What pieces of information to include.
* @param string $alnamespace The namespace to enumerate.
* @param integer $allimit Number of links to return.
public function enumerateLinks($alcontinue =
false, $alfrom =
null, $alto =
null, $alprefix =
null, $alunique =
null, array $alprop =
null,
$alnamespace =
null, $allimit =
null)
$path =
'?action=query&meta=siteinfo';
$path .=
'&alfrom=' .
$alfrom;
$path .=
'&alto=' .
$alto;
$path .=
'&alprefix=' .
$alprefix;
$path .=
'&alunique=' .
$alunique;
$path .=
'&alnamespace=' .
$alnamespace;
$path .=
'&allimit=' .
$allimit;
Documentation generated on Tue, 19 Nov 2013 15:07:10 +0100 by phpDocumentor 1.4.3