phpbb\search\fulltext_mysql::__construct PHP Method

__construct() public method

Constructor Creates a new \phpbb\search\fulltext_mysql, which is used as a search backend
public __construct ( string | boolean &$error, string $phpbb_root_path, string $phpEx, phpbb\auth\auth $auth, phpbb\config\config $config, $db, phpbb\user $user )
$error string | boolean Any error that occurs is passed on through this reference variable otherwise false
$phpbb_root_path string Relative path to phpBB root
$phpEx string PHP file extension
$auth phpbb\auth\auth Auth object
$config phpbb\config\config Config object
$user phpbb\user User object
    public function __construct(&$error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user)
    {
        $this->config = $config;
        $this->db = $db;
        $this->user = $user;
        $this->word_length = array('min' => $this->config['fulltext_mysql_min_word_len'], 'max' => $this->config['fulltext_mysql_max_word_len']);
        /**
         * Load the UTF tools
         */
        if (!function_exists('utf8_strlen')) {
            include $phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx;
        }
        $error = false;
    }