/** * Create the MetaLib connector. * * @return Connector */ protected function createConnector() { $institution = $this->config->General->institution ?: null; $host = $this->config->General->url ?: null; $user = $this->config->General->x_user ?: null; $pass = $this->config->General->x_password ?: null; $client = $this->serviceLocator->get('VuFind\\Http')->createClient(); $table = $this->serviceLocator->get('VuFind\\DbTablePluginManager')->get('metalibSearch'); $auth = $this->serviceLocator->get('ZfcRbac\\Service\\AuthorizationService'); $configReader = $this->serviceLocator->get('VuFind\\Config'); $sets = $configReader->get('MetaLibSets')->toArray(); $timeout = isset($this->config->General->timeout) ? $this->config->General->timeout : 60; $client->setOptions(['timeout' => $timeout]); /** * Should boolean operators in the search string be treated as * case-insensitive (false), or must they be ALL UPPERCASE (true)? */ $luceneHelper = isset($this->config->General->case_sensitive_bools) && !$this->config->General->case_sensitive_bools ? new LuceneSyntaxHelper() : null; $connector = new Connector($institution, $host, $user, $pass, $client, $table, $auth, $sets, $luceneHelper); $connector->setLogger($this->logger); return $connector; }