class JMediawikiSites extends JMediawikiObject

MediaWiki API Sites 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
getSiteInfo( array $siprop = null, string $sifilteriw = null, boolean $sishowalldb = false, boolean $sinumberingroup = false, array $siinlanguagecode = null)

Method to get site information.

object
getEvents( array $leprop = null, string $letype = null, string $leaction = null, string $letitle = null, string $leprefix = null, string $letag = null, string $leuser = null, string $lestart = null, string $leend = null, string $ledir = null, integer $lelimit = null)

Method to get events from logs.

object
getRecentChanges( string $rcstart = null, string $rcend = null, string $rcdir = null, array $rcnamespace = null, string $rcuser = null, string $rcexcludeuser = null, string $rctag = null, array $rcprop = null, array $rctoken = null, array $rcshow = null, string $rclimit = null, string $rctype = null, string $rctoponly = null)

Method to get recent changes on a site.

object
getProtectedTitles( array $ptnamespace = null, array $ptlevel = null, integer $ptlimit = null, string $ptdir = null, string $ptstart = null, string $ptend = null, array $ptprop = null)

Method to get protected titles on a site.

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 getSiteInfo( array $siprop = null, string $sifilteriw = null, boolean $sishowalldb = false, boolean $sinumberingroup = false, array $siinlanguagecode = null)

Method to get site information.

Parameters

array $siprop The sysinfo properties to get.
string $sifilteriw Only local or only non local entries to return.
boolean $sishowalldb List all database servers.
boolean $sinumberingroup List the number of users in usergroups.
array $siinlanguagecode Language code for localized languages.

Return Value

object

object getEvents( array $leprop = null, string $letype = null, string $leaction = null, string $letitle = null, string $leprefix = null, string $letag = null, string $leuser = null, string $lestart = null, string $leend = null, string $ledir = null, integer $lelimit = null)

Method to get events from logs.

Parameters

array $leprop List of properties to get.
string $letype Filter log actions to only this type.
string $leaction Filter log actions to only this type.
string $letitle Filter entries to those related to a page.
string $leprefix Filter entries that start with this prefix.
string $letag Filter entries with tag.
string $leuser Filter entries made by the given user.
string $lestart Starting timestamp.
string $leend Ending timestamp.
string $ledir Direction of enumeration.
integer $lelimit Event limit to return.

Return Value

object

object getRecentChanges( string $rcstart = null, string $rcend = null, string $rcdir = null, array $rcnamespace = null, string $rcuser = null, string $rcexcludeuser = null, string $rctag = null, array $rcprop = null, array $rctoken = null, array $rcshow = null, string $rclimit = null, string $rctype = null, string $rctoponly = null)

Method to get recent changes on a site.

Parameters

string $rcstart Starting timestamp.
string $rcend Ending timestamp.
string $rcdir Direction of enumeration.
array $rcnamespace Filter changes to only this namespace(s).
string $rcuser Filter changes by this user.
string $rcexcludeuser Filter changes to exclude changes by this user.
string $rctag Filter changes by this tag.
array $rcprop Filter log actions to only this type.
array $rctoken Which token to obtain for each change.
array $rcshow Filter changes by this criteria.
string $rclimit Changes limit to return.
string $rctype Filter event by type of changes.
string $rctoponly Filter changes which are latest revision.

Return Value

object

object getProtectedTitles( array $ptnamespace = null, array $ptlevel = null, integer $ptlimit = null, string $ptdir = null, string $ptstart = null, string $ptend = null, array $ptprop = null)

Method to get protected titles on a site.

Parameters

array $ptnamespace Only list titles in this namespace.
array $ptlevel Only list titles with these protection level.
integer $ptlimit Limit of pages to return.
string $ptdir Direction of enumeration.
string $ptstart Starting timestamp.
string $ptend Ending timestamp.
array $ptprop List of properties to get.

Return Value

object