Search
Extends AbstractMediawikiObjectMediaWiki API Search 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
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.
openSearch
Method to search the wiki using opensearch protocol.
openSearch( search, limit = null, array namespace = null, suggest = null, format = null) :
| since |
1.0 |
|---|
Arguments
- search
stringSearch string.- limit
intMaximum amount of results to return.- namespace
array<string|int, mixed>|nullNamespaces to search.- suggest
stringDo nothing if $wgEnableOpenSearchSuggest is false.- format
stringOutput format.
Response
object
search
Method to perform a full text search.
search( srsearch, array srnamespace = null, srwhat = null, array srinfo = null, array srprop = null, srredirects = null, sroffest = null, srlimit = null) :
| since |
1.0 |
|---|
Arguments
- srsearch
stringSearch for all page titles (or content) that has this value.- srnamespace
array<string|int, mixed>|nullThe namespace(s) to enumerate.- srwhat
stringSearch inside the text or titles.- srinfo
array<string|int, mixed>|nullWhat metadata to return.- srprop
array<string|int, mixed>|nullWhat properties to return.- srredirects
boolInclude redirect pages in the search.- sroffest
intUse this value to continue paging.- srlimit
intHow many total pages to return.
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