private function table_index_regenerate($tname) { $index = new manila_index(); $files = $this->child->file_directory_list("{$tname}"); foreach ($files as $file) { if (fnmatch($file, "*.ini")) { $name = substr($file, 0, -4); $content = $this->table_get($tname, $name); $keys = array_keys($content); unset($content); foreach ($keys as $key) { $index->set($key, $name); } } } $this->indices[$tname] = $index; }
public function table_index_lookup($tname, $field, $value) { $idx = $this->child->file_read("tables/{$tname}/{$field}.index"); $c = new manila_index($idx); return $c->get($value); }