JMediawikiCategories

Extends \JMediawikiObject

MediaWiki API Categories class for the Joomla Platform.

since

3.1.4

package

Joomla.Platform

Methods

__construct

Constructor.

__construct(\Joomla\Registry\Registry $options = null, \JMediawikiHttp $client = null) 
inherited
since

3.1.4

Arguments

$options

\Joomla\Registry\RegistryMediawiki options object.

$client

\JMediawikiHttpThe HTTP client object.

buildParameter

Method to build request parameters from a string array.

buildParameter(array $params) : string
inherited
since

3.1.4

Arguments

$params

arraystring array that contains the parameters

Response

stringrequest parameter

enumerateCategories

Method to enumerate all categories.

enumerateCategories(string $acfrom = null, string $acto = null, string $acprefix = null, string $acdir = null, integer $acmin = null, integer $acmax = null, integer $aclimit = null, array $acprop = null) : object
since

3.1.4

Arguments

$acfrom

stringThe category to start enumerating from.

$acto

stringThe category to stop enumerating at.

$acprefix

stringSearch for all category titles that begin with this value.

$acdir

stringDirection to sort in.

$acmin

integerMinimum number of category members.

$acmax

integerMaximum number of category members.

$aclimit

integerHow many categories to return.

$acprop

arrayWhich properties to get.

Response

object

fetchUrl

Method to build and return a full request URL for the request.

fetchUrl(string $path) : string
inherited
since

3.1.4

Arguments

$path

stringURL to inflect

Response

stringThe request URL.

getCategories

Method to list all categories the page(s) belong to.

getCategories(array $titles, array $clprop = null, array $clshow = null, integer $cllimit = null, boolean $clcontinue = false, array $clcategories = null, string $cldir = null) : object
since

3.0.0

Arguments

$titles

arrayPage titles to retrieve categories.

$clprop

arrayList of additional properties to get.

$clshow

arrayType of categories to show.

$cllimit

integerNumber of categories to return.

$clcontinue

booleanContinue when more results are available.

$clcategories

arrayOnly list these categories.

$cldir

stringDirection of listing.

Response

object

getCategoriesInfo

Method to get information about the given categories.

getCategoriesInfo(array $titles, boolean $clcontinue = false) : object
since

3.1.4

Arguments

$titles

arrayPage titles to retrieve categories.

$clcontinue

booleanContinue when more results are available.

Response

object

getCategoriesUsed

Method to get information about all categories used.

getCategoriesUsed(array $titles) : object
since

3.1.4

Arguments

$titles

arrayPage titles to retrieve categories.

Response

object

getCategoryMembers

Method to get information about the pages within a category

getCategoryMembers(string $cmtitle = null, string $cmpageid = null, string $cmlimit = null, array $cmprop = null, array $cmnamespace = null, array $cmtype = null, string $cmstart = null, string $cmend = null, string $cmstartsortkey = null, string $cmendsortkey = null, string $cmstartsortkeyprefix = null, string $cmendsortkeyprefix = null, string $cmsort = null, string $cmdir = null, string $cmcontinue = null) : object
since

3.2.2

throws

\RuntimeException

Arguments

$cmtitle

stringThe category title, must contain 'Category:' prefix, cannot be used together with $cmpageid

$cmpageid

stringThe category's page ID, cannot be used together with $cmtitle

$cmlimit

stringMaximum number of pages to retrieve

$cmprop

arrayArray of properties to retrieve

$cmnamespace

arrayNamespaces to retrieve pages from

$cmtype

arrayArray of category members to include, ignored if $cmsort is set to 'timestamp'

$cmstart

stringTimestamp to start listing from, only used if $cmsort is set to 'timestamp'

$cmend

stringTimestamp to end listing at, only used if $cmsort is set to 'timestamp'

$cmstartsortkey

stringHexadecimal key to start listing from, only used if $cmsort is set to 'sortkey'

$cmendsortkey

stringHexadecimal key to end listing at, only used if $cmsort is set to 'sortkey'

$cmstartsortkeyprefix

stringHexadecimal key prefix to start listing from, only used if $cmsort is set to 'sortkey', overrides $cmstartsortkey

$cmendsortkeyprefix

stringHexadecimal key prefix to end listing before, only used if $cmsort is set to 'sortkey', overrides $cmendsortkey

$cmsort

stringProperty to sort by

$cmdir

stringDirection to sort in

$cmcontinue

stringUsed to continue a previous request

Response

object

getChangeTags

Method to list change tags.

getChangeTags(array $tgprop = null, string $tglimit = null) : object
since

3.1.4

Arguments

$tgprop

arrayList of properties to get.

$tglimit

stringThe maximum number of tags to limit.

Response

object

validateResponse

Method to validate response for errors

validateResponse(\JHttpresponse $response) : Object
inherited
since

3.1.4

throws

\DomainException

Arguments

$response

\JHttpresponsereponse from the mediawiki server

Response

Object

Properties

options

Options for the MediaWiki object.

inherited
since

3.1.4

Type(s)

\Joomla\Registry\Registry

client

The HTTP client object to use in sending HTTP requests.

inherited
since

3.1.4

Type(s)

\JMediawikiHttp