class JMediawikiSearch extends JMediawikiObject

MediaWiki API Search 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
search( string $srsearch, array $srnamespace = null, string $srwhat = null, array $srinfo = null, array $srprop = null, boolean $srredirects = null, integer $sroffest = null, integer $srlimit = null)

Method to perform a full text search.

object
openSearch( string $search, integer $limit = null, array $namespace = null, string $suggest = null, string $format = null)

Method to search the wiki using opensearch protocol.

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

Method to perform a full text search.

Parameters

string $srsearch Search for all page titles (or content) that has this value.
array $srnamespace The namespace(s) to enumerate.
string $srwhat Search inside the text or titles.
array $srinfo What metadata to return.
array $srprop What properties to return.
boolean $srredirects Include redirect pages in the search.
integer $sroffest Use this value to continue paging.
integer $srlimit How many total pages to return.

Return Value

object

object openSearch( string $search, integer $limit = null, array $namespace = null, string $suggest = null, string $format = null)

Method to search the wiki using opensearch protocol.

Parameters

string $search Search string.
integer $limit Maximum amount of results to return.
array $namespace Namespaces to search.
string $suggest Do nothing if $wgEnableOpenSearchSuggest is false.
string $format Output format.

Return Value

object