public function autocompleteAll($requests) { $timing = $this->newTiming("autocompleteAll"); $p13nHost = $this->config->get('boxalino_host'); $p13nAccount = $this->getAccount(); $p13nUsername = $this->config->get('boxalino_username'); $p13nPassword = $this->config->get('boxalino_password'); $cookieDomain = $this->config->get('boxalino_domain'); $p13nSearch = $text; $p13nLanguage = $this->getShortLocale(); // Create basic P13n client $p13n = new HttpP13n(); $p13n->setHost($p13nHost); $p13n->setAuthorization($p13nUsername, $p13nPassword); // update cookies $p13n->getChoiceRequest($p13nAccount, $cookieDomain); // Call the service try { $requestBundle = new \com\boxalino\p13n\api\thrift\AutocompleteRequestBundle(); $requestBundle->requests = $requests; $responseBundle = $p13n->autocompleteAll($requestBundle); } catch (Exception $e) { $this->debug("autocompleteAll failed", $e->getMessage()); $this->debugProtected($requestBundle, $responseBundle); if ($this->isDebug()) { exit; } Shopware()->PluginLogger()->debug('Boxalino Autocompletion: Error occurred with message ' . $e->getMessage()); return; } $timing(); $this->debugProtected($requestBundle, $responseBundle); return $responseBundle->responses; }