getXmlFileContent($xml_file); // insert, update, delete, select action $action = strtolower($xml_obj->query->attrs->action); if(!$action) return; $parser = new QueryParser($xml_obj->query); FileHandler::writeFile($cache_file, $parser->toString()); } // singleton /* function &getDBParser(){ static $dbParser; if(!$dbParser){ //$oDB = &DB::getInstance(); //$dbParser = $oDB->getParser(); return new DBParser('"'); } return $dbParser; }*/ function getXmlFileContent($xml_file){ $buff = FileHandler::readFile($xml_file); $xml_obj = parent::parse($buff); if(!$xml_obj) return; unset($buff); return $xml_obj; } function &getDBParser(){ if(!$this->dbParser) $this->dbParser = new DBParser('"'); return $this->dbParser; } } ?>