Source for file categories.php
Documentation is available at categories.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 Categories class for the Joomla Platform.
* @package Joomla.Platform
* Method to list all categories the page(s) belong to.
* @param array $titles Page titles to retrieve categories.
* @param array $clprop List of additional properties to get.
* @param array $clshow Type of categories to show.
* @param integer $cllimit Number of categories to return.
* @param boolean $clcontinue Continue when more results are available.
* @param array $clcategories Only list these categories.
* @param string $cldir Direction of listing.
public function getCategories(array $titles, array $clprop =
null, array $clshow =
null, $cllimit =
null, $clcontinue =
false,
array $clcategories =
null, $cldir =
null)
$path =
'?action=query&prop=categories';
// Append titles to the request.
$path .=
'&titles=' .
$this->buildParameter($titles);
$path .=
'&cllimit=' .
$cllimit;
if (isset
($clcategories))
$path .=
'&cldir=' .
$cldir;
* Method to get information about all categories used.
* @param array $titles Page titles to retrieve categories.
$path =
'?action=query&generator=categories&prop=info';
// Append titles to the request
$path .=
'&titles=' .
$this->buildParameter($titles);
$response =
$this->client->get($this->fetchUrl($path));
* Method to get information about the given categories.
* @param array $titles Page titles to retrieve categories.
* @param boolean $clcontinue Continue when more results are available.
$path =
'?action=query&prop=categoryinfo';
// Append titles to the request
$path .=
'&titles=' .
$this->buildParameter($titles);
* Method to enumerate all categories.
* @param string $acfrom The category to start enumerating from.
* @param string $acto The category to stop enumerating at.
* @param string $acprefix Search for all category titles that begin with this value.
* @param string $acdir Direction to sort in.
* @param integer $acmin Minimum number of category members.
* @param integer $acmax Maximum number of category members.
* @param integer $aclimit How many categories to return.
* @param array $acprop Which properties to get.
public function enumerateCategories($acfrom =
null, $acto =
null, $acprefix =
null, $acdir =
null, $acmin =
null,
$acmax =
null, $aclimit =
null, array $acprop =
null)
$path =
'?action=query&list=allcategories';
$path .=
'&acfrom=' .
$acfrom;
$path .=
'&acto=' .
$acto;
$path .=
'&acprefix=' .
$acprefix;
$path .=
'&acdir=' .
$acdir;
$path .=
'&acfrom=' .
$acfrom;
$path .=
'&acmin=' .
$acmin;
$path .=
'&acmax=' .
$acmax;
$path .=
'&aclimit=' .
$aclimit;
* Method to list change tags.
* @param array $tgprop List of properties to get.
* @param string $tglimit The maximum number of tags to limit.
public function getChangeTags(array $tgprop =
null, $tglimit =
null)
$path =
'?action=query&list=tags';
$path .=
'&tglimit=' .
$tglimit;
// @TODO add support for $tgcontinue
Documentation generated on Tue, 19 Nov 2013 14:55:04 +0100 by phpDocumentor 1.4.3