merge changes of luminous to maserati (~r12676)

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12680 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2013-02-04 08:09:07 +00:00
commit 0f04bd3f92
50 changed files with 784 additions and 265 deletions

View file

@ -1,4 +1,8 @@
<?php
/**
* File containing the XE 1.5 XmlQueryParserClass
*/
if(!defined('__XE_LOADED_XML_CLASS__'))
{
define('__XE_LOADED_XML_CLASS__', 1);
@ -30,13 +34,12 @@ if(!defined('__XE_LOADED_XML_CLASS__'))
}
/**
* New XmlQueryParser class
* @author NHN (developers@xpressengine.com)
* @brief case to parse XE xml query
* @version 0.1
* New XmlQueryParser class <br />
* Parses XE XML query files
*
* @todo need to support extend query such as subquery, union
* @todo include info about column types for parsing user input
* @author Corina Udrescu (corina.udrescu@arnia.ro)
* @package classes\xml
* @version 0.1
*/
class XmlQueryParser extends XmlParser
{
@ -50,11 +53,12 @@ class XmlQueryParser extends XmlParser
/**
* Create XmlQueryParser instance for Singleton
*
* @return XmlQueryParser object
*/
function &getInstance()
{
static $theInstance = null;
static $theInstance = NULL;
if(!isset($theInstance))
{
$theInstance = new XmlQueryParser();
@ -63,9 +67,16 @@ class XmlQueryParser extends XmlParser
}
/**
* Parses an XML query file
*
* 1. Read xml file<br />
* 2. Check the action<br />
* 3. Parsing and write a cache file<br />
* 3. Parse and write cache file <br />
*
* @param $query_id
* @param $xml_file
* @param $cache_file
*
* @return QueryParser object
*/
function &parse_xml_query($query_id, $xml_file, $cache_file)
@ -85,8 +96,13 @@ class XmlQueryParser extends XmlParser
}
/**
* Query XML file parsing
* @return QueryParser object
* Override for parent "parse" method
*
* @param null $query_id
* @param null $xml_file
* @param null $cache_file
*
* @return void
*/
function parse($query_id = NULL, $xml_file = NULL, $cache_file = NULL)
{
@ -94,8 +110,11 @@ class XmlQueryParser extends XmlParser
}
/**
* Return XML file content
* @return array|NULL Returns a resultant data object or NULL in case of error
* Returns XML file contents as an object
* or NULL in case of error
*
* @param $xml_file
* @return array|NULL
*/
function getXmlFileContent($xml_file)
{