class JMediawikiCategories extends JMediawikiObject

MediaWiki API Categories class for the Joomla Platform.

Methods

__construct( Registry $options = null, JMediawikiHttp $client = null)

Constructor.

string
buildParameter( array $params)

Method to build request parameters from a string array.

Object
validateResponse( JHttpresponse $response)

Method to validate response for errors

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

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

object
getCategoriesUsed( array $titles)

Method to get information about all categories used.

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

Method to get information about the given categories.

object
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)

Method to get information about the pages within a category

object
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)

Method to enumerate all categories.

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

Method to list change tags.

Details

__construct( Registry $options = null, JMediawikiHttp $client = null)

Constructor.

Parameters

Registry $options Mediawiki options object.
JMediawikiHttp $client The HTTP client object.

string buildParameter( array $params)

Method to build request parameters from a string array.

Parameters

array $params string array that contains the parameters

Return Value

string request parameter

Object validateResponse( JHttpresponse $response)

Method to validate response for errors

Parameters

JHttpresponse $response reponse from the mediawiki server

Return Value

Object

Exceptions

DomainException

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

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

Parameters

array $titles Page titles to retrieve categories.
array $clprop List of additional properties to get.
array $clshow Type of categories to show.
integer $cllimit Number of categories to return.
boolean $clcontinue Continue when more results are available.
array $clcategories Only list these categories.
string $cldir Direction of listing.

Return Value

object

object getCategoriesUsed( array $titles)

Method to get information about all categories used.

Parameters

array $titles Page titles to retrieve categories.

Return Value

object

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

Method to get information about the given categories.

Parameters

array $titles Page titles to retrieve categories.
boolean $clcontinue Continue when more results are available.

Return Value

object

object 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)

Method to get information about the pages within a category

Parameters

string $cmtitle The category title, must contain 'Category:' prefix, cannot be used together with $cmpageid
string $cmpageid The category's page ID, cannot be used together with $cmtitle
string $cmlimit Maximum number of pages to retrieve
array $cmprop Array of properties to retrieve
array $cmnamespace Namespaces to retrieve pages from
array $cmtype Array of category members to include, ignored if $cmsort is set to 'timestamp'
string $cmstart Timestamp to start listing from, only used if $cmsort is set to 'timestamp'
string $cmend Timestamp to end listing at, only used if $cmsort is set to 'timestamp'
string $cmstartsortkey Hexadecimal key to start listing from, only used if $cmsort is set to 'sortkey'
string $cmendsortkey Hexadecimal key to end listing at, only used if $cmsort is set to 'sortkey'
string $cmstartsortkeyprefix Hexadecimal key prefix to start listing from, only used if $cmsort is set to 'sortkey', overrides $cmstartsortkey
string $cmendsortkeyprefix Hexadecimal key prefix to end listing before, only used if $cmsort is set to 'sortkey', overrides $cmendsortkey
string $cmsort Property to sort by
string $cmdir Direction to sort in
string $cmcontinue Used to continue a previous request

Return Value

object

Exceptions

RuntimeException

object 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)

Method to enumerate all categories.

Parameters

string $acfrom The category to start enumerating from.
string $acto The category to stop enumerating at.
string $acprefix Search for all category titles that begin with this value.
string $acdir Direction to sort in.
integer $acmin Minimum number of category members.
integer $acmax Maximum number of category members.
integer $aclimit How many categories to return.
array $acprop Which properties to get.

Return Value

object

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

Method to list change tags.

Parameters

array $tgprop List of properties to get.
string $tglimit The maximum number of tags to limit.

Return Value

object