JMediawikiSearch
Extends \JMediawikiObjectMediaWiki API Search 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
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.
openSearch
Method to search the wiki using opensearch protocol.
openSearch(string $search, integer $limit = null, array $namespace = null, string $suggest = null, string $format = null) : object
since |
3.1.4 |
---|
Arguments
- $search
string
Search string.- $limit
integer
Maximum amount of results to return.- $namespace
array
Namespaces to search.- $suggest
string
Do nothing if $wgEnableOpenSearchSuggest is false.- $format
string
Output format.
Response
object
search
Method to perform a full text search.
search(string $srsearch, array $srnamespace = null, string $srwhat = null, array $srinfo = null, array $srprop = null, boolean $srredirects = null, integer $sroffest = null, integer $srlimit = null) : object
since |
3.1.4 |
---|
Arguments
- $srsearch
string
Search for all page titles (or content) that has this value.- $srnamespace
array
The namespace(s) to enumerate.- $srwhat
string
Search inside the text or titles.- $srinfo
array
What metadata to return.- $srprop
array
What properties to return.- $srredirects
boolean
Include redirect pages in the search.- $sroffest
integer
Use this value to continue paging.- $srlimit
integer
How many total pages to return.
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.