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) : 
inherited
since

1.0

Arguments

options

Registry|nullMediawiki options object.

client

Http|nullThe HTTP client object.

Response

mixed

buildParameter

Method to build request parameters from a string array.

buildParameter(mixed||string|int params) : 
inherited
since

1.0

Arguments

params

array<string|int, mixed>string array that contains the parameters

Response

stringrequest parameter

enumerateCategories

Method to enumerate all categories.

enumerateCategories( acfrom = null,  acto = null,  acprefix = null,  acdir = null,  acmin = null,  acmax = null,  aclimit = null, array acprop = null) : 
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

array<string|int, mixed>|nullWhich properties to get.

Response

object

fetchUrl

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

fetchUrl( path) : 
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(mixed||string|int titles, array clprop = null, array clshow = null, int cllimit = null,  clcontinue = false, array clcategories = null, string cldir = null) : 
since

1.0

Arguments

titles

array<string|int, mixed>Page titles to retrieve categories.

clprop

array<string|int, mixed>|nullList of additional properties to get.

clshow

array<string|int, mixed>|nullType of categories to show.

cllimit

int|nullNumber of categories to return.

clcontinue

boolContinue when more results are available.

clcategories

array<string|int, mixed>|nullOnly list these categories.

cldir

string|nullDirection of listing.

Response

object

getCategoriesInfo

Method to get information about the given categories.

getCategoriesInfo(mixed||string|int titles,  clcontinue = false) : 
since

1.0

Arguments

titles

array<string|int, mixed>Page titles to retrieve categories.

clcontinue

boolContinue when more results are available.

Response

object

getCategoriesUsed

Method to get information about all categories used.

getCategoriesUsed(mixed||string|int titles) : 
since

1.0

Arguments

titles

array<string|int, mixed>Page titles to retrieve categories.

Response

object

getCategoryMembers

Method to get information about the pages within a category

getCategoryMembers( cmtitle = null,  cmpageid = null,  cmlimit = null, array cmprop = null, array cmnamespace = null, array cmtype = null,  cmstart = null,  cmend = null,  cmstartsortkey = null,  cmendsortkey = null,  cmstartsortkeyprefix = null,  cmendsortkeyprefix = null,  cmsort = null,  cmdir = null,  cmcontinue = null) : 
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

array<string|int, mixed>|nullArray of properties to retrieve

cmnamespace

array<string|int, mixed>|nullNamespaces to retrieve pages from

cmtype

array<string|int, mixed>|nullArray 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,  tglimit = null) : 
since

1.0

Arguments

tgprop

array<string|int, mixed>|nullList 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

ResponseThe response from the mediawiki server.

Response

SimpleXMLElement

Properties

options

Options for the Mediawiki object.

inherited
since

1.0

Type(s)

Registry

client

The HTTP client object to use in sending HTTP requests.

inherited
since

1.0

Type(s)

Http