00001 <?php
00002
00015
00016
00017
00018 import('search.SearchFileParser');
00019
00020 class SearchHelperParser extends SearchFileParser {
00021
00023 var $type;
00024
00025 function SearchHelperParser($type, $filePath) {
00026 parent::SearchFileParser($filePath);
00027 $this->type = $type;
00028 }
00029
00030 function open() {
00031 $prog = Config::getVar('search', 'index[' . $this->type . ']');
00032
00033 if (isset($prog)) {
00034 $exec = sprintf($prog, escapeshellcmd($this->getFilePath()));
00035 $this->fp = @popen($exec, 'r');
00036 return $this->fp ? true : false;
00037 }
00038
00039 return false;
00040 }
00041
00042 function close() {
00043 pclose($this->fp);
00044 }
00045
00046 }
00047
00048 ?>