JMediawikiPages
Extends \JMediawikiObjectMediaWiki API Pages class for the Joomla Platform.
since |
3.1.4 |
---|---|
package |
Joomla.Platform |
Methods
__construct
Constructor.
__construct(\Joomla\Registry\Registry $options = null, \JMediawikiHttp $client = null)
since |
3.1.4 |
---|
Arguments
- $options
\Joomla\Registry\Registry
Mediawiki options object.- $client
\JMediawikiHttp
The HTTP client object.
buildParameter
Method to build request parameters from a string array.
buildParameter(array $params) : string
since |
3.1.4 |
---|
Arguments
- $params
array
string array that contains the parameters
Response
string
request parameter
changeProtection
Method to change the protection level of a page.
changeProtection(string $title, string $protections, string $expiry = null, string $reason = null, string $cascade = null, string $watchlist = null) : object
since |
3.1.4 |
---|
Arguments
- $title
string
Title of the page you want to (un)protect.- $protections
string
Pipe-separated list of protection levels.- $expiry
string
Expiry timestamps.- $reason
string
Reason for (un)protecting (optional).- $cascade
string
Enable cascading protection.- $watchlist
string
Unconditionally add or remove the page from your watchlist.
Response
object
deletePageById
Method to delete a page.
deletePageById(string $pageid, string $reason = null, string $watchlist = null, string $oldimage = null) : object
since |
3.1.4 |
---|
Arguments
- $pageid
string
Page ID of the page you want to delete.- $reason
string
Reason for the deletion.- $watchlist
string
Unconditionally add or remove the page from your watchlis.- $oldimage
string
The name of the old image to delete.
Response
object
deletePageByName
Method to delete a page.
deletePageByName(string $title, string $reason = null, string $watchlist = null, string $oldimage = null) : object
since |
3.1.4 |
---|
Arguments
- $title
string
Title of the page you want to delete.- $reason
string
Reason for the deletion.- $watchlist
string
Unconditionally add or remove the page from your watchlis.- $oldimage
string
The name of the old image to delete.
Response
object
editPage
Method to edit a page.
editPage(string $title, integer $section = null, string $sectiontitle = null, string $text = null, string $summary = null) : object
since |
3.1.4 |
---|
Arguments
- $title
string
Page title.- $section
integer
Section number.- $sectiontitle
string
The title for a new section.- $text
string
Page content.- $summary
string
Title of the page you want to delete.
Response
object
fetchUrl
Method to build and return a full request URL for the request.
fetchUrl(string $path) : string
since |
3.1.4 |
---|
Arguments
- $path
string
URL to inflect
Response
string
The request URL.
getBackLinks
Method to get all pages that link to the given page.
getBackLinks(string $bltitle, integer $blpageid = null, boolean $blcontinue = null, array $blnamespace = null, string $blfilterredirect = null, integer $bllimit = null, boolean $blredirect = null) : object
since |
3.1.4 |
---|
Arguments
- $bltitle
string
Title to search.- $blpageid
integer
Pageid to search.- $blcontinue
boolean
When more results are available, use this to continue.- $blnamespace
array
The namespace to enumerate.- $blfilterredirect
string
How to filter for redirects..- $bllimit
integer
How many total pages to return.- $blredirect
boolean
If 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(string $iwbltitle, string $iwblprefix = null, boolean $iwblcontinue = null, integer $iwbllimit = null, array $iwblprop = null) : object
since |
3.1.4 |
---|
Arguments
- $iwbltitle
string
Interwiki link to search for. Must be used with iwblprefix.- $iwblprefix
string
Prefix for the interwiki.- $iwblcontinue
boolean
When more results are available, use this to continue.- $iwbllimit
integer
How many total pages to return.- $iwblprop
array
Which properties to get.
Response
object
getPageInfo
Method to get basic page information.
getPageInfo(array $titles, array $inprop = null, array $intoken = null, boolean $incontinue = null) : object
since |
3.1.4 |
---|
Arguments
- $titles
array
Page titles to retrieve info.- $inprop
array
Which additional properties to get.- $intoken
array
Request a token to perform a data-modifying action on a page- $incontinue
boolean
When more results are available, use this to continue.
Response
object
getPageProperties
Method to get various properties defined in the page content.
getPageProperties(array $titles, boolean $ppcontinue = null, string $ppprop = null) : object
since |
3.1.4 |
---|
Arguments
- $titles
array
Page titles to retrieve properties.- $ppcontinue
boolean
When more results are available, use this to continue.- $ppprop
string
Page prop to look on the page for.
Response
object
getPageTemplates
Method to get all page templates from the given page.
getPageTemplates(array $titles, array $tlnamespace = null, integer $tllimit = null, boolean $tlcontinue = null, string $tltemplates = null, string $tldir = null) : object
since |
3.1.4 |
---|
Arguments
- $titles
array
Page titles to retrieve templates.- $tlnamespace
array
Show templates in this namespace(s) only.- $tllimit
integer
How many templates to return.- $tlcontinue
boolean
When more results are available, use this to continue.- $tltemplates
string
Only list these templates.- $tldir
string
The direction in which to list.
Response
object
getRevisions
Method to get a list of revisions.
getRevisions(array $titles, array $rvprop = null, boolean $rvparse = null, integer $rvlimit = null) : object
since |
3.1.4 |
---|
Arguments
- $titles
array
Page titles to retrieve revisions.- $rvprop
array
Which properties to get for each revision.- $rvparse
boolean
Parse revision content.- $rvlimit
integer
Limit how many revisions will be returned.
Response
object
getToken
Method to get access token.
getToken(string $user, string $intoken) : object
since |
3.0.0 |
---|
Arguments
- $user
string
The User to get token.- $intoken
string
The type of token.
Response
object
movePageById
Method to move a page.
movePageById(integer $fromid, string $to, string $reason = null, string $movetalk = null, string $movesubpages = null, boolean $noredirect = null, string $watchlist = null, boolean $ignorewarnings = null) : object
since |
3.1.4 |
---|
Arguments
- $fromid
integer
Page ID of the page you want to move.- $to
string
Title you want to rename the page to.- $reason
string
Reason for the move (optional).- $movetalk
string
Move the talk page, if it exists.- $movesubpages
string
Move subpages, if applicable.- $noredirect
boolean
Don't create a redirect.- $watchlist
string
Unconditionally add or remove the page from your watchlist.- $ignorewarnings
boolean
Ignore any warnings.
Response
object
movePageByName
Method to move a page.
movePageByName(string $from, string $to, string $reason = null, string $movetalk = null, string $movesubpages = null, boolean $noredirect = null, string $watchlist = null, boolean $ignorewarnings = null) : object
since |
3.1.4 |
---|
Arguments
- $from
string
Title of the page you want to move.- $to
string
Title you want to rename the page to.- $reason
string
Reason for the move (optional).- $movetalk
string
Move the talk page, if it exists.- $movesubpages
string
Move subpages, if applicable.- $noredirect
boolean
Don't create a redirect.- $watchlist
string
Unconditionally add or remove the page from your watchlist.- $ignorewarnings
boolean
Ignore any warnings.
Response
object
rollback
Method to undo the last edit to the page.
rollback(string $title, string $user, string $summary = null, string $markbot = null, string $watchlist = null) : object
since |
3.1.4 |
---|
Arguments
- $title
string
Title of the page you want to rollback.- $user
string
Name of the user whose edits are to be rolled back.- $summary
string
Custom edit summary. If not set, default summary will be used.- $markbot
string
Mark the reverted edits and the revert as bot edits.- $watchlist
string
Unconditionally add or remove the page from your watchlist.
Response
object
undeletePage
Method to restore certain revisions of a deleted page.
undeletePage(string $title, string $reason = null, string $timestamp = null, string $watchlist = null) : object
since |
3.1.4 |
---|
Arguments
- $title
string
Title of the page you want to restore.- $reason
string
Reason for restoring (optional).- $timestamp
string
Timestamps of the revisions to restore.- $watchlist
string
Unconditionally add or remove the page from your watchlist.
Response
object
validateResponse
Method to validate response for errors
validateResponse(\JHttpresponse $response) : Object
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $response
\JHttpresponse
reponse from the mediawiki server
Response
Object
Properties
client
The HTTP client object to use in sending HTTP requests.