public function __construct(&$error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user)
{
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $phpEx;
$this->config = $config;
$this->user = $user;
$this->db = $db;
$this->auth = $auth;
// Initialize \phpbb\db\tools\tools object
global $phpbb_container;
// TODO inject into object
$this->db_tools = $phpbb_container->get('dbal.tools');
if (!$this->config['fulltext_sphinx_id']) {
$this->config->set('fulltext_sphinx_id', unique_id());
}
$this->id = $this->config['fulltext_sphinx_id'];
$this->indexes = 'index_phpbb_' . $this->id . '_delta;index_phpbb_' . $this->id . '_main';
if (!class_exists('SphinxClient')) {
require $this->phpbb_root_path . 'includes/sphinxapi.' . $this->php_ext;
}
// Initialize sphinx client
$this->sphinx = new \SphinxClient();
$this->sphinx->SetServer($this->config['fulltext_sphinx_host'] ? $this->config['fulltext_sphinx_host'] : 'localhost', $this->config['fulltext_sphinx_port'] ? (int) $this->config['fulltext_sphinx_port'] : 9312);
$error = false;
}