mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-04 19:12:12 +09:00
Changed code to use dbParser as singleton - instead of passing it in the constructor every time.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8392 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
abba8761cc
commit
52c3d503bc
20 changed files with 82 additions and 113 deletions
|
|
@ -23,22 +23,20 @@
|
|||
$action = strtolower($xml_obj->query->attrs->action);
|
||||
if(!$action) return;
|
||||
|
||||
//$oDB = &DB::getParser();
|
||||
//$dbParser = $oDB->getParser();
|
||||
$dbParser = $this->getDBParser();
|
||||
$parser = new QueryParser($xml_obj->query, $dbParser);
|
||||
$parser = new QueryParser($xml_obj->query);
|
||||
|
||||
FileHandler::writeFile($cache_file, $parser->toString());
|
||||
}
|
||||
|
||||
// singleton
|
||||
function getDBParser(){
|
||||
if(!$this->dbParser){
|
||||
function &getDBParser(){
|
||||
static $dbParser;
|
||||
if(!$dbParser){
|
||||
//$oDB = &DB::getParser();
|
||||
//$dbParser = $oDB->getParser();
|
||||
$this->dbParser = new DBParser('"');
|
||||
//self::$dbParser = $oDB->getParser();
|
||||
$dbParser = new DBParser('"');
|
||||
}
|
||||
return $this->dbParser;
|
||||
return $dbParser;
|
||||
}
|
||||
|
||||
function getXmlFileContent($xml_file){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue