Lines Matching +full:- +full:q

53         if ($this->hasAccess !== null) {
54 return $this->hasAccess; // we already checked
64 $httpclient->timeout = 5;
65 $data = $httpclient->get(self::EXTENSION_REPOSITORY_API . '?cmd=ping');
67 $this->hasAccess = false;
70 $this->hasAccess = false;
73 $this->hasAccess = true;
75 return $this->hasAccess;
86 if (!$this->checkAccess()) return;
94 $response = $httpclient->post(self::EXTENSION_REPOSITORY_API, $data);
96 $this->hasAccess = false;
104 $this->storeCache($extension['plugin'], $extension);
109 $this->storeCache($id, []);
112 $this->hasAccess = false;
137 $data = $this->retrieveCache($id);
147 $this->fetchExtensions($toload);
149 $data = $this->retrieveCache($id);
170 $result = $this->initExtensions([$id]);
185 $data = $this->retrieveCache($id);
187 $this->fetchExtensions([$id]);
188 $data = $this->retrieveCache($id);
196 * @param string $q the query string
200 public function searchExtensions($q) argument
202 if (!$this->checkAccess()) return [];
204 $query = $this->parseQuery($q);
208 $response = $httpclient->post(self::EXTENSION_REPOSITORY_API, $query);
210 $this->hasAccess = false;
217 $this->hasAccess = false;
223 $this->storeCache($item['plugin'], $item);
232 * @param string $q
235 protected function parseQuery($q) argument
245 if (preg_match_all('/(^|\s)(tag:([\S]+))/', $q, $matches, PREG_SET_ORDER)) {
247 $q = str_replace($m[2], '', $q);
252 if (preg_match_all('/(^|\s)(authorid:([\S]+))/', $q, $matches, PREG_SET_ORDER)) {
254 $q = str_replace($m[2], '', $q);
259 if (preg_match_all('/(^|\s)(ext:([\S]+))/', $q, $matches, PREG_SET_ORDER)) {
261 $q = str_replace($m[2], '', $q);
266 if (preg_match_all('/(^|\s)(type:([\S]+))/', $q, $matches, PREG_SET_ORDER)) {
271 $q = str_replace($m[2], '', $q);
279 $parameters['q'] = trim($q);
293 $cache->storeCache(serialize($data));
305 if ($cache->useCache(['age' => self::CACHE_TIME])) {
306 return unserialize($cache->retrieveCache(false));