Pages
Extends AbstractMediawikiObjectMediaWiki API Pages class.
| since |
1.0 |
|---|---|
| package |
Joomla Framework |
Methods
__construct
Constructor.
__construct(\Joomla\Registry\Registry options = null, \Joomla\Mediawiki\Http client = null) :
buildParameter
Method to build request parameters from a string array.
buildParameter(mixed||string|int params) :
| since |
1.0 |
|---|
Arguments
- params
array<string|int, mixed>string array that contains the parameters
Response
stringrequest parameter
changeProtection
Method to change the protection level of a page.
changeProtection( title, protections, expiry = null, reason = null, cascade = null, watchlist = null) :
| since |
1.0 |
|---|
Arguments
- title
stringTitle of the page you want to (un)protect.- protections
stringPipe-separated list of protection levels.- expiry
stringExpiry timestamps.- reason
stringReason for (un)protecting (optional).- cascade
stringEnable cascading protection.- watchlist
stringUnconditionally add or remove the page from your watchlist.
Response
object
deletePageByID
Method to delete a page.
deletePageByID( pageid, reason = null, watchlist = null, oldimage = null) :
| since |
1.0 |
|---|
Arguments
- pageid
stringPage ID of the page you want to delete.- reason
stringReason for the deletion.- watchlist
stringUnconditionally add or remove the page from your watchlist.- oldimage
stringThe name of the old image to delete.
Response
object
deletePageByName
Method to delete a page.
deletePageByName( title, reason = null, watchlist = null, oldimage = null) :
| since |
1.0 |
|---|
Arguments
- title
stringTitle of the page you want to delete.- reason
stringReason for the deletion.- watchlist
stringUnconditionally add or remove the page from your watchlist.- oldimage
stringThe name of the old image to delete.
Response
object
editPage
Method to edit a page.
editPage( title, section = null, sectiontitle = null, text = null, summary = null) :
| since |
1.0 |
|---|
Arguments
- title
stringPage title.- section
intSection number.- sectiontitle
stringThe title for a new section.- text
stringPage content.- summary
stringTitle of the page you want to delete.
Response
object
fetchUrl
Method to build and return a full request URL for the request.
fetchUrl( path) :
| since |
1.0 |
|---|
Arguments
- path
stringURL to inflect
Response
stringThe request URL.
getBackLinks
Method to get all pages that link to the given page.
getBackLinks( bltitle, blpageid = null, blcontinue = null, array blnamespace = null, blfilterredirect = null, bllimit = null, blredirect = null) :
| since |
1.0 |
|---|
Arguments
- bltitle
stringTitle to search.- blpageid
intPageid to search.- blcontinue
boolWhen more results are available, use this to continue.- blnamespace
array<string|int, mixed>|nullThe namespace to enumerate.- blfilterredirect
stringHow to filter for redirects..- bllimit
intHow many total pages to return.- blredirect
boolIf linking page is a redirect, find all pages that link to that redirect as well.
Response
object
getIWBackLinks
Method to get all pages that link to the given interwiki link.
getIWBackLinks( iwbltitle, iwblprefix = null, iwblcontinue = null, iwbllimit = null, array iwblprop = null) :
| since |
1.0 |
|---|
Arguments
- iwbltitle
stringInterwiki link to search for. Must be used with iwblprefix.- iwblprefix
stringPrefix for the interwiki.- iwblcontinue
boolWhen more results are available, use this to continue.- iwbllimit
intHow many total pages to return.- iwblprop
array<string|int, mixed>|nullWhich properties to get.
Response
object
getPageInfo
Method to get basic page information.
getPageInfo(mixed||string|int titles, array inprop = null, array intoken = null, incontinue = null) :
| since |
1.0 |
|---|
Arguments
- titles
array<string|int, mixed>Page titles to retrieve info.- inprop
array<string|int, mixed>|nullWhich additional properties to get.- intoken
array<string|int, mixed>|nullRequest a token to perform a data-modifying action on a page- incontinue
boolWhen more results are available, use this to continue.
Response
object
getPageProperties
Method to get various properties defined in the page content.
getPageProperties(mixed||string|int titles, ppcontinue = null, ppprop = null) :
| since |
1.0 |
|---|
Arguments
- titles
array<string|int, mixed>Page titles to retrieve properties.- ppcontinue
boolWhen more results are available, use this to continue.- ppprop
stringPage prop to look on the page for.
Response
object
getPageTemplates
Method to get all page templates from the given page.
getPageTemplates(mixed||string|int titles, array tlnamespace = null, tllimit = null, tlcontinue = null, tltemplates = null, tldir = null) :
| since |
1.0 |
|---|
Arguments
- titles
array<string|int, mixed>Page titles to retrieve templates.- tlnamespace
array<string|int, mixed>|nullShow templates in this namespace(s) only.- tllimit
intHow many templates to return.- tlcontinue
boolWhen more results are available, use this to continue.- tltemplates
stringOnly list these templates.- tldir
stringThe direction in which to list.
Response
object
getRevisions
Method to get a list of revisions.
getRevisions(mixed||string|int titles, array rvprop = null, rvparse = null, rvlimit = null) :
| since |
1.0 |
|---|
Arguments
- titles
array<string|int, mixed>Page titles to retrieve revisions.- rvprop
array<string|int, mixed>|nullWhich properties to get for each revision.- rvparse
boolParse revision content.- rvlimit
intLimit how many revisions will be returned.
Response
object
getToken
Method to get access token.
getToken( user, intoken) :
| since |
1.0 |
|---|
Arguments
- user
stringThe User to get token.- intoken
stringThe type of token.
Response
string
movePageByID
Method to move a page.
movePageByID( fromid, to, reason = null, movetalk = null, movesubpages = null, noredirect = null, watchlist = null, ignorewarnings = null) :
| since |
1.0 |
|---|
Arguments
- fromid
intPage ID of the page you want to move.- to
stringTitle you want to rename the page to.- reason
stringReason for the move (optional).- movetalk
stringMove the talk page, if it exists.- movesubpages
stringMove subpages, if applicable.- noredirect
boolDon't create a redirect.- watchlist
stringUnconditionally add or remove the page from your watchlist.- ignorewarnings
boolIgnore any warnings.
Response
object
movePageByName
Method to move a page.
movePageByName( from, to, reason = null, movetalk = null, movesubpages = null, noredirect = null, watchlist = null, ignorewarnings = null) :
| since |
1.0 |
|---|
Arguments
- from
stringTitle of the page you want to move.- to
stringTitle you want to rename the page to.- reason
stringReason for the move (optional).- movetalk
stringMove the talk page, if it exists.- movesubpages
stringMove subpages, if applicable.- noredirect
boolDon't create a redirect.- watchlist
stringUnconditionally add or remove the page from your watchlist.- ignorewarnings
boolIgnore any warnings.
Response
object
rollback
Method to undo the last edit to the page.
rollback( title, user, summary = null, markbot = null, watchlist = null) :
| since |
1.0 |
|---|
Arguments
- title
stringTitle of the page you want to rollback.- user
stringName of the user whose edits are to be rolled back.- summary
stringCustom edit summary. If not set, default summary will be used.- markbot
stringMark the reverted edits and the revert as bot edits.- watchlist
stringUnconditionally add or remove the page from your watchlist.
Response
object
undeletePage
Method to restore certain revisions of a deleted page.
undeletePage( title, reason = null, timestamp = null, watchlist = null) :
| since |
1.0 |
|---|
Arguments
- title
stringTitle of the page you want to restore.- reason
stringReason for restoring (optional).- timestamp
stringTimestamps of the revisions to restore.- watchlist
stringUnconditionally add or remove the page from your watchlist.
Response
object
validateResponse
Method to validate response for errors
validateResponse(\Joomla\Http\Response response) : \SimpleXMLElement
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- response
ResponseThe response from the mediawiki server.
Response
SimpleXMLElement