Lines Matching +full:- +full:q
53 if ($this->hasAccess !== null) {
54 return $this->hasAccess; // we already checked
64 $httpclient->timeout = 5;
66 $data = $httpclient->get(self::EXTENSION_REPOSITORY_API . '?cmd=ping');
68 $this->hasAccess = false;
71 $this->hasAccess = false;
74 $this->hasAccess = true;
76 return $this->hasAccess;
87 if (!$this->checkAccess()) return;
95 $response = $httpclient->post(self::EXTENSION_REPOSITORY_API, $data);
97 $this->hasAccess = false;
105 $this->storeCache($extension['plugin'], $extension);
110 $this->storeCache($id, []);
113 $this->hasAccess = false;
138 $data = $this->retrieveCache($id);
148 $this->fetchExtensions($toload);
150 $data = $this->retrieveCache($id);
171 $result = $this->initExtensions([$id]);
186 $data = $this->retrieveCache($id);
188 $this->fetchExtensions([$id]);
189 $data = $this->retrieveCache($id);
197 * @param string $q the query string
201 public function searchExtensions($q) argument
203 if (!$this->checkAccess()) return [];
205 $query = $this->parseQuery($q);
209 $response = $httpclient->post(self::EXTENSION_REPOSITORY_API, $query);
211 $this->hasAccess = false;
218 $this->hasAccess = false;
224 $this->storeCache($item['plugin'], $item);
233 * @param string $q
236 protected function parseQuery($q) argument
246 if (preg_match_all('/(^|\s)(tag:([\S]+))/', $q, $matches, PREG_SET_ORDER)) {
248 $q = str_replace($m[2], '', $q);
253 if (preg_match_all('/(^|\s)(authorid:([\S]+))/', $q, $matches, PREG_SET_ORDER)) {
255 $q = str_replace($m[2], '', $q);
260 if (preg_match_all('/(^|\s)(ext:([\S]+))/', $q, $matches, PREG_SET_ORDER)) {
262 $q = str_replace($m[2], '', $q);
267 if (preg_match_all('/(^|\s)(type:([\S]+))/', $q, $matches, PREG_SET_ORDER)) {
272 $q = str_replace($m[2], '', $q);
280 $parameters['q'] = trim($q);
294 $cache->storeCache(serialize($data));
306 if ($cache->useCache(['age' => self::CACHE_TIME])) {
307 return unserialize($cache->retrieveCache(false));