10 defined(
'JPATH_PLATFORM') or die;
38 public function search($srsearch, array $srnamespace = null, $srwhat = null, array $srinfo = null, array $srprop = null,
39 $srredirects = null, $sroffest = null, $srlimit = null)
42 $path =
'?action=query&list=search';
46 $path .=
'&srsearch=' . $srsearch;
49 if (isset($srnamespace))
51 $path .=
'&srnamespace=' . $this->buildParameter($srnamespace);
56 $path .=
'&srwhat=' . $srwhat;
61 $path .=
'&srinfo=' . $this->buildParameter($srinfo);
66 $path .=
'&srprop=' . $this->buildParameter($srprop);
71 $path .=
'&srredirects=';
76 $path .=
'&sroffest=' . $sroffest;
81 $path .=
'&srlimit=' . $srlimit;
85 $response = $this->client->get($this->fetchUrl($path));
87 return $this->validateResponse($response);
103 public function openSearch($search, $limit = null, array $namespace = null, $suggest = null, $format = null)
106 $path =
'?action=query&list=search';
110 $path .=
'&search=' . $search;
115 $path .=
'&limit=' . $limit;
118 if (isset($namespace))
120 $path .=
'&namespace=' . $this->buildParameter($namespace);
125 $path .=
'&suggest=' . $suggest;
130 $path .=
'&format=' . $format;
134 $response = $this->client->get($this->fetchUrl($path));
136 return $this->validateResponse($response);