type = $type; } function open() { $prog = Config::getVar('search', 'index[' . $this->type . ']'); if (isset($prog)) { $exec = sprintf($prog, escapeshellcmd($this->getFilePath())); $this->fp = @popen($exec, 'r'); return $this->fp ? true : false; } return false; } function close() { pclose($this->fp); } } ?>