mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 09:32:15 +09:00
New query parser method to also return the parser object when generating cache file
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10556 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
79e14634ee
commit
78ec133603
1 changed files with 11 additions and 3 deletions
|
|
@ -57,8 +57,8 @@
|
||||||
return $theInstance;
|
return $theInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
function parse($query_id = NULL, $xml_file = NULL, $cache_file = NULL) {
|
function &parse_xml_query($query_id, $xml_file, $cache_file)
|
||||||
|
{
|
||||||
// Read xml file
|
// Read xml file
|
||||||
$xml_obj = $this->getXmlFileContent($xml_file);
|
$xml_obj = $this->getXmlFileContent($xml_file);
|
||||||
|
|
||||||
|
|
@ -66,10 +66,18 @@
|
||||||
$action = strtolower($xml_obj->query->attrs->action);
|
$action = strtolower($xml_obj->query->attrs->action);
|
||||||
if(!$action) return;
|
if(!$action) return;
|
||||||
|
|
||||||
|
// Write query cache file
|
||||||
$parser = new QueryParser($xml_obj->query);
|
$parser = new QueryParser($xml_obj->query);
|
||||||
FileHandler::writeFile($cache_file, $parser->toString());
|
FileHandler::writeFile($cache_file, $parser->toString());
|
||||||
|
|
||||||
|
return $parser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parse($query_id = NULL, $xml_file = NULL, $cache_file = NULL)
|
||||||
|
{
|
||||||
|
$query_parser = &$this->parse_xml_query($query_id, $xml_file, $cache_file);
|
||||||
|
}
|
||||||
|
|
||||||
function getXmlFileContent($xml_file){
|
function getXmlFileContent($xml_file){
|
||||||
$buff = FileHandler::readFile($xml_file);
|
$buff = FileHandler::readFile($xml_file);
|
||||||
$xml_obj = parent::parse($buff);
|
$xml_obj = parent::parse($buff);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue