mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
Few more changes for last commit - "Moved call to getDBParser from XmlQueryParser.class.php to DB.class.php".
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9140 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e1bf4523c7
commit
20d589afc0
2 changed files with 18 additions and 11 deletions
|
|
@ -788,6 +788,24 @@
|
|||
$this->elapsed_dbclass_time = $elapsed_dbclass_time;
|
||||
$GLOBALS['__dbclass_elapsed_time__'] += $elapsed_dbclass_time;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a database specific parser class
|
||||
* used for escaping expressions and table/column identifiers
|
||||
*
|
||||
* Requires an implementation of the DB class (won't work if database is not set)
|
||||
*
|
||||
* @remarks singleton
|
||||
*/
|
||||
function &getParser($force = false){
|
||||
static $dbParser = null;
|
||||
if(!$dbParser || $force) {
|
||||
$oDB = &DB::getInstance();
|
||||
$dbParser = $oDB->getParser();
|
||||
}
|
||||
|
||||
return $dbParser;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -70,17 +70,6 @@
|
|||
FileHandler::writeFile($cache_file, $parser->toString());
|
||||
}
|
||||
|
||||
// singleton
|
||||
function &getDBParser($force = false){
|
||||
static $dbParser = null;
|
||||
if(!$dbParser || $force) {
|
||||
$oDB = &DB::getInstance();
|
||||
$dbParser = $oDB->getParser();
|
||||
}
|
||||
|
||||
return $dbParser;
|
||||
}
|
||||
|
||||
function getXmlFileContent($xml_file){
|
||||
$buff = FileHandler::readFile($xml_file);
|
||||
$xml_obj = parent::parse($buff);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue