Categories

Extends AbstractMediawikiObject

MediaWiki API Categories class.

since

1.0

package

Joomla Framework

Methods

__construct

Constructor.

__construct(\Joomla\Registry\Registry options = null, \Joomla\Mediawiki\Http client = null) : mixed
inherited
since

1.0

Arguments

options

\Joomla\Registry\RegistryMediawiki options object.

client

\Joomla\Mediawiki\HttpThe HTTP client object.

Response

mixed

buildParameter

Method to build request parameters from a string array.

buildParameter(array params) : string
inherited
since

1.0

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, int acmin = null, int acmax = null, int aclimit = null, array acprop = null) : object
since

1.0

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

intMinimum number of category members.

acmax

intMaximum number of category members.

aclimit

intHow 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

1.0

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, int cllimit = null, bool clcontinue = false, array clcategories = null, string cldir = null) : object
since

1.0

Arguments

titles

arrayPage titles to retrieve categories.

clprop

arrayList of additional properties to get.

clshow

arrayType of categories to show.

cllimit

intNumber of categories to return.

clcontinue

boolContinue 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, bool clcontinue = false) : object
since

1.0

Arguments

titles

arrayPage titles to retrieve categories.

clcontinue

boolContinue when more results are available.

Response

object

getCategoriesUsed

Method to get information about all categories used.

getCategoriesUsed(array titles) : object
since

1.0

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

1.0

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

1.0

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(\Joomla\Http\Response response) : \SimpleXMLElement
inherited
since

1.0

throws

\DomainException

Arguments

response

\Joomla\Http\ResponseThe response from the mediawiki server.

Response

\SimpleXMLElement

Properties

options

Options for the Mediawiki object.

inherited
since

1.0

Type(s)

\Joomla\Registry\Registry

client

The HTTP client object to use in sending HTTP requests.

inherited
since

1.0

Type(s)

\Joomla\Mediawiki\Http