mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-15 09:19:57 +09:00
merge from 1.5.3 (~r10943)
git-svn-id: http://xe-core.googlecode.com/svn/trunk@10951 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7aa4798373
commit
54e3a72065
334 changed files with 13011 additions and 5561 deletions
|
|
@ -1,14 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @class NewXmlQueryParser
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief case to parse XE xml query
|
||||
* @version 0.1
|
||||
*
|
||||
* @todo need to support extend query such as subquery, union
|
||||
* @todo include info about column types for parsing user input
|
||||
**/
|
||||
|
||||
if(!defined('__XE_LOADED_XML_CLASS__')){
|
||||
define('__XE_LOADED_XML_CLASS__', 1);
|
||||
|
||||
|
|
@ -21,6 +11,7 @@
|
|||
require(_XE_PATH_.'classes/xml/xmlquery/tags/column/ColumnTag.class.php');
|
||||
require(_XE_PATH_.'classes/xml/xmlquery/tags/column/SelectColumnTag.class.php');
|
||||
require(_XE_PATH_.'classes/xml/xmlquery/tags/column/InsertColumnTag.class.php');
|
||||
require(_XE_PATH_.'classes/xml/xmlquery/tags/column/InsertColumnTagWithoutArgument.class.php');
|
||||
require(_XE_PATH_.'classes/xml/xmlquery/tags/column/UpdateColumnTag.class.php');
|
||||
require(_XE_PATH_.'classes/xml/xmlquery/tags/column/SelectColumnsTag.class.php');
|
||||
require(_XE_PATH_.'classes/xml/xmlquery/tags/column/InsertColumnsTag.class.php');
|
||||
|
|
@ -43,12 +34,27 @@
|
|||
require(_XE_PATH_.'classes/xml/xmlquery/queryargument/DefaultValue.class.php');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* New XmlQueryParser class
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief case to parse XE xml query
|
||||
* @version 0.1
|
||||
*
|
||||
* @todo need to support extend query such as subquery, union
|
||||
* @todo include info about column types for parsing user input
|
||||
*/
|
||||
class XmlQueryParser extends XmlParser {
|
||||
|
||||
/**
|
||||
* constructor
|
||||
* @return void
|
||||
*/
|
||||
function XmlQueryParser(){
|
||||
}
|
||||
|
||||
/**
|
||||
* Create XmlQueryParser instance for Singleton
|
||||
* @return XmlQueryParser object
|
||||
*/
|
||||
function &getInstance(){
|
||||
static $theInstance = null;
|
||||
if(!isset($theInstance)){
|
||||
|
|
@ -57,6 +63,12 @@
|
|||
return $theInstance;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Read xml file<br />
|
||||
* 2. Check the action<br />
|
||||
* 3. Parsing and write a cache file<br />
|
||||
* @return QueryParser object
|
||||
*/
|
||||
function &parse_xml_query($query_id, $xml_file, $cache_file)
|
||||
{
|
||||
// Read xml file
|
||||
|
|
@ -73,11 +85,19 @@
|
|||
return $parser;
|
||||
}
|
||||
|
||||
/**
|
||||
* Query XML file parsing
|
||||
* @return QueryParser object
|
||||
*/
|
||||
function parse($query_id = NULL, $xml_file = NULL, $cache_file = NULL)
|
||||
{
|
||||
$query_parser = &$this->parse_xml_query($query_id, $xml_file, $cache_file);
|
||||
$this->parse_xml_query($query_id, $xml_file, $cache_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return XML file content
|
||||
* @return array|NULL Returns a resultant data object or NULL in case of error
|
||||
*/
|
||||
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