Issue 2759: Update code comments for database classes

git-svn-id: http://xe-core.googlecode.com/svn/branches/luminous@12416 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2012-12-17 12:37:22 +00:00
parent 9d9914ff3b
commit d2872f1ac4

View file

@ -1,5 +1,9 @@
<?php
if(!defined('__XE_LOADED_XML_CLASS__')){
/**
* File containing the XE 1.5 XmlQueryParserClass
*/
if(!defined('__XE_LOADED_XML_CLASS__')){
define('__XE_LOADED_XML_CLASS__', 1);
require(_XE_PATH_.'classes/xml/xmlquery/tags/query/QueryTag.class.php');
@ -32,31 +36,24 @@
require(_XE_PATH_.'classes/xml/xmlquery/queryargument/SortQueryArgument.class.php');
require(_XE_PATH_.'classes/xml/xmlquery/queryargument/validator/QueryArgumentValidator.class.php');
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
* 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 dbclasses
*/
class XmlQueryParser extends XmlParser {
/**
* constructor
* @return void
*/
function XmlQueryParser(){
}
class XmlQueryParser extends XmlParser {
/**
* Create XmlQueryParser instance for Singleton
* @return XmlQueryParser object
*/
function &getInstance(){
static $theInstance = null;
function &getInstance()
{
static $theInstance = NULL;
if(!isset($theInstance)){
$theInstance = new XmlQueryParser();
}
@ -64,9 +61,16 @@
}
/**
* 1. Read xml file<br />
* 2. Check the action<br />
* 3. Parsing and write a cache file<br />
* Parses an XML query file
*
* 1. Read xml file <br />
* 2. Check the action <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)
@ -86,8 +90,13 @@
}
/**
* 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)
{
@ -95,15 +104,19 @@
}
/**
* 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){
function getXmlFileContent($xml_file)
{
$buff = FileHandler::readFile($xml_file);
$xml_obj = parent::parse($buff);
if(!$xml_obj) return;
unset($buff);
return $xml_obj;
}
}
}
?>