public function __construct() { $pdo = new PDO("sqlite::memory:"); $pdo->exec(file_get_contents(dirname(__FILE__) . "/../../sql/create-tables.sqlite.sql")); Zizelo_Facade::setDefaultStorage(new Zizelo_Storage_Pdo($pdo)); $this->search_index = Zizelo_Facade::getIndex("things"); }
/** * Get text analyzer for this index. * @return Zizelo_Analyzer_Interface */ protected function getAnalyzer() { if (empty($this->analyzer)) { if (empty(self::$default_analyzer)) { // default default analyzer self::$default_analyzer = new Zizelo_Analyzer_Default(); } $this->analyzer = self::$default_analyzer; } return $this->analyzer; }