From ebc5edeec7e45fc11f7bd0594ed4211c1f2356fe Mon Sep 17 00:00:00 2001 From: ovclas Date: Tue, 19 Jun 2012 08:53:24 +0000 Subject: [PATCH] add phpDoc comment git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10780 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../expression/ClickCountExpression.class.php | 4 +- classes/xml/xmlquery/DBParser.class.php | 7 +- classes/xml/xmlquery/QueryParser.class.php | 28 ++++++- .../xml/xmlquery/argument/Argument.class.php | 70 ++++++++++++++-- .../argument/ConditionArgument.class.php | 42 +++++++--- .../xmlquery/argument/SortArgument.class.php | 7 +- .../queryargument/DefaultValue.class.php | 46 +++++++++- .../queryargument/QueryArgument.class.php | 46 +++++++++- .../queryargument/SortQueryArgument.class.php | 11 ++- .../QueryArgumentValidator.class.php | 40 +++++++++ .../xmlquery/tags/column/ColumnTag.class.php | 31 ++++--- .../tags/column/InsertColumnTag.class.php | 25 ++++-- .../InsertColumnTagWithoutArgument.class.php | 23 +++-- .../tags/column/InsertColumnsTag.class.php | 34 ++++++-- .../tags/column/SelectColumnTag.class.php | 29 +++++-- .../tags/column/SelectColumnsTag.class.php | 25 +++++- .../tags/column/UpdateColumnTag.class.php | 31 ++++--- .../tags/column/UpdateColumnsTag.class.php | 35 ++++++-- .../condition/ConditionGroupTag.class.php | 28 ++++++- .../tags/condition/ConditionTag.class.php | 46 ++++++++-- .../tags/condition/ConditionsTag.class.php | 20 +++++ .../condition/JoinConditionsTag.class.php | 16 +++- .../xmlquery/tags/group/GroupsTag.class.php | 17 +++- .../tags/navigation/IndexTag.class.php | 33 +++++++- .../tags/navigation/LimitTag.class.php | 29 ++++++- .../tags/navigation/NavigationTag.class.php | 40 +++++++++ .../xmlquery/tags/query/QueryTag.class.php | 84 ++++++++++++++++++- .../tags/table/HintTableTag.class.php | 26 +++--- .../xmlquery/tags/table/TableTag.class.php | 80 ++++++++++++------ .../xmlquery/tags/table/TablesTag.class.php | 38 +++++---- 30 files changed, 830 insertions(+), 161 deletions(-) diff --git a/classes/db/queryparts/expression/ClickCountExpression.class.php b/classes/db/queryparts/expression/ClickCountExpression.class.php index 4857b252d..367681c0c 100644 --- a/classes/db/queryparts/expression/ClickCountExpression.class.php +++ b/classes/db/queryparts/expression/ClickCountExpression.class.php @@ -8,7 +8,7 @@ class ClickCountExpression extends SelectExpression { /** * click count - * @var boolean + * @var bool */ var $click_count; @@ -16,7 +16,7 @@ * constructor * @param string $column_name * @param string $alias - * @param boolean $click_count + * @param bool $click_count * @return void */ function ClickCountExpression($column_name, $alias = NULL, $click_count = false){ diff --git a/classes/xml/xmlquery/DBParser.class.php b/classes/xml/xmlquery/DBParser.class.php index b10d8df6e..111f698f4 100644 --- a/classes/xml/xmlquery/DBParser.class.php +++ b/classes/xml/xmlquery/DBParser.class.php @@ -4,7 +4,7 @@ * @author NHN (developers@xpressengine.com) * @package /classes/xml/xmlquery * @version 0.1 - **/ + */ class DBParser { /** * Character for escape target value on the left @@ -154,6 +154,11 @@ return implode('', $functions); } + /* + * Checks argument is asterisk + * @param string $column_name + * @return bool + */ function isStar($column_name){ if(substr($column_name,-1) == '*') return true; return false; diff --git a/classes/xml/xmlquery/QueryParser.class.php b/classes/xml/xmlquery/QueryParser.class.php index 3ff1cb73d..056b123ec 100644 --- a/classes/xml/xmlquery/QueryParser.class.php +++ b/classes/xml/xmlquery/QueryParser.class.php @@ -1,14 +1,34 @@ queryTag = new QueryTag($query, $isSubQuery); } + /** + * Return table information + * @param object $query_id + * @param bool $table_name + * @return array + */ function getTableInfo($query_id, $table_name) { $column_type = array(); $module = ''; @@ -56,6 +76,10 @@ return $column_type; } + /** + * Change code string from queryTag object + * @return string + */ function toString() { return "queryTag->toString() diff --git a/classes/xml/xmlquery/argument/Argument.class.php b/classes/xml/xmlquery/argument/Argument.class.php index d44fe36dd..146f097a7 100644 --- a/classes/xml/xmlquery/argument/Argument.class.php +++ b/classes/xml/xmlquery/argument/Argument.class.php @@ -1,17 +1,57 @@ value = $value; $this->name = $name; @@ -60,6 +100,11 @@ class Argument { return $this->value; } + /** + * mixed value to string + * @param mixed $value + * @return string + */ function toString($value) { if (is_array($value)) { if (count($value) === 0) @@ -71,6 +116,11 @@ class Argument { return $value; } + /** + * escape value + * @param mixed $value + * @return mixed + */ function escapeValue($value) { $column_type = $this->getType(); if ($column_type == 'column_name') { @@ -106,6 +156,11 @@ class Argument { return $value; } + /** + * escape string value + * @param string $value + * @return string + */ function _escapeStringValue($value) { $db = &DB::getInstance(); $value = $db->addQuotes($value); @@ -135,6 +190,11 @@ class Argument { } } + /** + * check filter by filter type + * @param string $filter_type + * @return void + */ function checkFilter($filter_type) { if (isset($this->value) && $this->value != '') { global $lang; diff --git a/classes/xml/xmlquery/argument/ConditionArgument.class.php b/classes/xml/xmlquery/argument/ConditionArgument.class.php index dd8e2c83a..ce7f17934 100644 --- a/classes/xml/xmlquery/argument/ConditionArgument.class.php +++ b/classes/xml/xmlquery/argument/ConditionArgument.class.php @@ -1,9 +1,25 @@ operation = $operation; } + /** + * create condition value. set $this->value + * @return void + */ function createConditionValue(){ if(!isset($this->value)) return; @@ -64,16 +84,16 @@ } /** - * Since ConditionArgument is used in WHERE clause, - * where the argument value is compared to a table column, - * it is assumed that all arguments have type. There are cases though - * where the column does not have any type - if it was removed from - * the XML schema for example - see the is_secret column in xe_documents table. - * In this case, the column type is retrieved according to argument - * value type (using the PHP function is_numeric). - * - * @return type string - */ + * Since ConditionArgument is used in WHERE clause, + * where the argument value is compared to a table column, + * it is assumed that all arguments have type. There are cases though + * where the column does not have any type - if it was removed from + * the XML schema for example - see the is_secret column in xe_documents table. + * In this case, the column type is retrieved according to argument + * value type (using the PHP function is_numeric). + * + * @return type string + */ function getType(){ if($this->type) { diff --git a/classes/xml/xmlquery/argument/SortArgument.class.php b/classes/xml/xmlquery/argument/SortArgument.class.php index 639b10a06..fc83d1c6f 100644 --- a/classes/xml/xmlquery/argument/SortArgument.class.php +++ b/classes/xml/xmlquery/argument/SortArgument.class.php @@ -1,5 +1,10 @@ column_name = $dbParser->parseColumnName($column_name); diff --git a/classes/xml/xmlquery/queryargument/QueryArgument.class.php b/classes/xml/xmlquery/queryargument/QueryArgument.class.php index a5840ce8b..ebeb7a30f 100644 --- a/classes/xml/xmlquery/queryargument/QueryArgument.class.php +++ b/classes/xml/xmlquery/queryargument/QueryArgument.class.php @@ -1,15 +1,53 @@ isConditionArgument()) { // Instantiation diff --git a/classes/xml/xmlquery/queryargument/SortQueryArgument.class.php b/classes/xml/xmlquery/queryargument/SortQueryArgument.class.php index 4424c3f5b..e99486f1f 100644 --- a/classes/xml/xmlquery/queryargument/SortQueryArgument.class.php +++ b/classes/xml/xmlquery/queryargument/SortQueryArgument.class.php @@ -1,6 +1,15 @@ argument_name diff --git a/classes/xml/xmlquery/queryargument/validator/QueryArgumentValidator.class.php b/classes/xml/xmlquery/queryargument/validator/QueryArgumentValidator.class.php index aa3fef3d4..dbf8ce3a9 100644 --- a/classes/xml/xmlquery/queryargument/validator/QueryArgumentValidator.class.php +++ b/classes/xml/xmlquery/queryargument/validator/QueryArgumentValidator.class.php @@ -1,16 +1,56 @@ argument = $argument; $this->argument_name = $this->argument->getArgumentName(); diff --git a/classes/xml/xmlquery/tags/column/ColumnTag.class.php b/classes/xml/xmlquery/tags/column/ColumnTag.class.php index 8ffe77373..33edeba26 100644 --- a/classes/xml/xmlquery/tags/column/ColumnTag.class.php +++ b/classes/xml/xmlquery/tags/column/ColumnTag.class.php @@ -1,19 +1,28 @@ tag inside an XML Query file - * - * Since the tag supports different attributes depending on - * the type of query (select, update, insert, delete) this is only - * the base class for the classes that will model each type tag. + /** + * ColumnTag class + * Models the tag inside an XML Query file + * Since the tag supports different attributes depending on + * the type of query (select, update, insert, delete) this is only + * the base class for the classes that will model each type tag. * - **/ - + * @author Arnia Software + * @package /classes/xml/xmlquery/tags/column + * @version 0.1 + */ class ColumnTag { + /** + * Column name + * @var string + */ var $name; + /** + * constructor + * @param string $name + * @return void + */ function ColumnTag($name){ $this->name = $name; } - } \ No newline at end of file + } diff --git a/classes/xml/xmlquery/tags/column/InsertColumnTag.class.php b/classes/xml/xmlquery/tags/column/InsertColumnTag.class.php index 500d25b6d..0bef31920 100644 --- a/classes/xml/xmlquery/tags/column/InsertColumnTag.class.php +++ b/classes/xml/xmlquery/tags/column/InsertColumnTag.class.php @@ -1,15 +1,24 @@ tag inside an XML Query file whose action is 'insert' - * - **/ - - + /** + * InsertColumnTag + * Models the tag inside an XML Query file whose action is 'insert' + * + * @author Arnia Software + * @package /classes/xml/xmlquery/tags/column + * @version 0.1 + */ class InsertColumnTag extends ColumnTag { + /** + * argument + * @var QueryArgument object + */ var $argument; + /** + * constructor + * @param object $column + * @return void + */ function InsertColumnTag($column) { parent::ColumnTag($column->attrs->name); $dbParser = DB::getParser(); diff --git a/classes/xml/xmlquery/tags/column/InsertColumnTagWithoutArgument.class.php b/classes/xml/xmlquery/tags/column/InsertColumnTagWithoutArgument.class.php index cbe3f7634..86ac458dc 100644 --- a/classes/xml/xmlquery/tags/column/InsertColumnTagWithoutArgument.class.php +++ b/classes/xml/xmlquery/tags/column/InsertColumnTagWithoutArgument.class.php @@ -1,13 +1,18 @@ tag inside an XML Query file whose action is 'insert-select' - * - **/ - + /** + * InsertColumnTagWithoutArgument + * Models the tag inside an XML Query file whose action is 'insert-select' + * + * @author Arnia Software + * @package /classes/xml/xmlquery/tags/column + * @version 0.1 + */ class InsertColumnTagWithoutArgument extends ColumnTag { - + /** + * constructor + * @param object $column + * @return void + */ function InsertColumnTagWithoutArgument($column) { parent::ColumnTag($column->attrs->name); $dbParser = DB::getParser(); @@ -23,4 +28,4 @@ } } -?> \ No newline at end of file +?> diff --git a/classes/xml/xmlquery/tags/column/InsertColumnsTag.class.php b/classes/xml/xmlquery/tags/column/InsertColumnsTag.class.php index d849952db..0cfca653c 100644 --- a/classes/xml/xmlquery/tags/column/InsertColumnsTag.class.php +++ b/classes/xml/xmlquery/tags/column/InsertColumnsTag.class.php @@ -1,14 +1,24 @@ tag inside an XML Query file whose action is 'insert' - * - **/ - + /** + * InsertColumnsTag class + * Models the tag inside an XML Query file whose action is 'insert' + * + * @author Arnia Software + * @package /classes/xml/xmlquery/tags/column + * @version 0.1 + */ class InsertColumnsTag{ + /** + * Column list + * @var array value is InsertColumnTag object + */ var $columns; + /** + * constructor + * @param array|string $xml_columns + * @return void + */ function InsertColumnsTag($xml_columns) { $this->columns = array(); @@ -24,6 +34,10 @@ } } + /** + * InsertColumnTag object to string + * @return string + */ function toString(){ $output_columns = 'array(' . PHP_EOL; foreach($this->columns as $column){ @@ -34,6 +48,10 @@ return $output_columns; } + /** + * Return argument list + * @return array + */ function getArguments(){ $arguments = array(); foreach($this->columns as $column){ @@ -44,4 +62,4 @@ } -?> \ No newline at end of file +?> diff --git a/classes/xml/xmlquery/tags/column/SelectColumnTag.class.php b/classes/xml/xmlquery/tags/column/SelectColumnTag.class.php index 22153d346..bef7e0fd2 100644 --- a/classes/xml/xmlquery/tags/column/SelectColumnTag.class.php +++ b/classes/xml/xmlquery/tags/column/SelectColumnTag.class.php @@ -1,16 +1,29 @@ tag inside an XML Query file whose action is 'select' - * - **/ - + /** + * SelectColumnTag + * Models the tag inside an XML Query file whose action is 'select' + * + * @author Arnia Software + * @package /classes/xml/xmlquery/tags/column + * @version 0.1 + */ class SelectColumnTag extends ColumnTag{ + /** + * alias + * @var string + */ var $alias; + /** + * click count status + * @var bool + */ var $click_count; + /** + * constructor + * @param string|object $column + * @return void + */ function SelectColumnTag($column){ if ($column == "*" || $column->attrs->name == '*') { diff --git a/classes/xml/xmlquery/tags/column/SelectColumnsTag.class.php b/classes/xml/xmlquery/tags/column/SelectColumnsTag.class.php index 22f6c024e..47ec7446f 100644 --- a/classes/xml/xmlquery/tags/column/SelectColumnsTag.class.php +++ b/classes/xml/xmlquery/tags/column/SelectColumnsTag.class.php @@ -1,8 +1,23 @@ columns as $column){ @@ -48,6 +67,10 @@ return $output_columns; } + /** + * Return argument list + * @return array + */ function getArguments(){ $arguments = array(); foreach($this->columns as $column){ diff --git a/classes/xml/xmlquery/tags/column/UpdateColumnTag.class.php b/classes/xml/xmlquery/tags/column/UpdateColumnTag.class.php index 1e53e2410..e2616ac34 100644 --- a/classes/xml/xmlquery/tags/column/UpdateColumnTag.class.php +++ b/classes/xml/xmlquery/tags/column/UpdateColumnTag.class.php @@ -1,18 +1,29 @@ tag inside an XML Query file whose action is 'update' - * - **/ - - - + /** + * UpdateColumnTag + * Models the tag inside an XML Query file whose action is 'update' + * + * @author Arnia Software + * @package /classes/xml/xmlquery/tags/column + * @version 0.1 + */ class UpdateColumnTag extends ColumnTag { + /** + * argument + * @var QueryArgument object + */ var $argument; + /** + * default value + * @var string + */ var $default_value; + /** + * constructor + * @param object $column + * @return void + */ function UpdateColumnTag($column) { parent::ColumnTag($column->attrs->name); $dbParser = DB::getParser(); diff --git a/classes/xml/xmlquery/tags/column/UpdateColumnsTag.class.php b/classes/xml/xmlquery/tags/column/UpdateColumnsTag.class.php index eb6ca94ea..dfa6b9a6b 100644 --- a/classes/xml/xmlquery/tags/column/UpdateColumnsTag.class.php +++ b/classes/xml/xmlquery/tags/column/UpdateColumnsTag.class.php @@ -1,15 +1,24 @@ tag inside an XML Query file whose action is 'update' - * - **/ - + /** + * UpdateColumnsTag + * Models the tag inside an XML Query file whose action is 'update' + * + * @author Arnia Software + * @package /classes/xml/xmlquery/tags/column + * @version 0.1 + */ class UpdateColumnsTag{ + /** + * Column list + * @var array value is UpdateColumnTag object + */ var $columns; + /** + * constructor + * @param array|string $xml_columns + * @return void + */ function UpdateColumnsTag($xml_columns) { $this->columns = array(); @@ -21,6 +30,10 @@ } } + /** + * UpdateColumnTag object to string + * @return string + */ function toString(){ $output_columns = 'array(' . PHP_EOL; foreach($this->columns as $column){ @@ -31,6 +44,10 @@ return $output_columns; } + /** + * Return argument list + * @return array + */ function getArguments(){ $arguments = array(); foreach($this->columns as $column){ @@ -41,4 +58,4 @@ } -?> \ No newline at end of file +?> diff --git a/classes/xml/xmlquery/tags/condition/ConditionGroupTag.class.php b/classes/xml/xmlquery/tags/condition/ConditionGroupTag.class.php index 2fa3609db..068c62479 100644 --- a/classes/xml/xmlquery/tags/condition/ConditionGroupTag.class.php +++ b/classes/xml/xmlquery/tags/condition/ConditionGroupTag.class.php @@ -1,9 +1,29 @@ pipe = $pipe; @@ -19,6 +39,10 @@ return $this->conditions; } + /** + * ConditionTag object to string + * @return string + */ function getConditionGroupString(){ $conditions_string = 'array('.PHP_EOL; foreach($this->conditions as $condition){ @@ -39,4 +63,4 @@ } } -?> \ No newline at end of file +?> diff --git a/classes/xml/xmlquery/tags/condition/ConditionTag.class.php b/classes/xml/xmlquery/tags/condition/ConditionTag.class.php index f916e16ac..ea82fdc25 100644 --- a/classes/xml/xmlquery/tags/condition/ConditionTag.class.php +++ b/classes/xml/xmlquery/tags/condition/ConditionTag.class.php @@ -1,22 +1,54 @@ tag inside an XML Query file. Base class. + * ConditionTag + * Models the tag inside an XML Query file. Base class. * + * @author Corina + * @package /classes/xml/xmlquery/tags/condition + * @version 0.1 */ - class ConditionTag { + /** + * operation for example 'in', 'between', 'not in'... + * @var string + */ var $operation; + /** + * Column name + * @var string + */ var $column_name; - + /** + * Pipe + * @var string + */ var $pipe; + /** + * Argument name + * @var string + */ var $argument_name; + /** + * QueryArgument object + * @var QueryArgument + */ var $argument; + /** + * Default column + * @var string + */ var $default_column; - + /** + * QueryTag object + * @var QueryTag + */ var $query; + + /** + * constructor + * @param object $condition + * @return void + */ function ConditionTag($condition){ $this->operation = $condition->attrs->operation; $this->pipe = $condition->attrs->pipe; diff --git a/classes/xml/xmlquery/tags/condition/ConditionsTag.class.php b/classes/xml/xmlquery/tags/condition/ConditionsTag.class.php index 5e8b30b12..e5a6ef206 100644 --- a/classes/xml/xmlquery/tags/condition/ConditionsTag.class.php +++ b/classes/xml/xmlquery/tags/condition/ConditionsTag.class.php @@ -1,7 +1,23 @@ condition_groups = array(); if (!$xml_conditions) @@ -29,6 +45,10 @@ } } + /** + * ConditionGroupTag object to string + * @return string + */ function toString(){ $output_conditions = 'array(' . PHP_EOL; foreach($this->condition_groups as $condition){ diff --git a/classes/xml/xmlquery/tags/condition/JoinConditionsTag.class.php b/classes/xml/xmlquery/tags/condition/JoinConditionsTag.class.php index 3b59989f6..690b1893d 100644 --- a/classes/xml/xmlquery/tags/condition/JoinConditionsTag.class.php +++ b/classes/xml/xmlquery/tags/condition/JoinConditionsTag.class.php @@ -1,11 +1,21 @@ condition_groups[0]->conditions[0]->setPipe(""); } } -?> \ No newline at end of file +?> diff --git a/classes/xml/xmlquery/tags/group/GroupsTag.class.php b/classes/xml/xmlquery/tags/group/GroupsTag.class.php index d492859b5..5da76bd08 100644 --- a/classes/xml/xmlquery/tags/group/GroupsTag.class.php +++ b/classes/xml/xmlquery/tags/group/GroupsTag.class.php @@ -1,8 +1,23 @@ groups = array(); diff --git a/classes/xml/xmlquery/tags/navigation/IndexTag.class.php b/classes/xml/xmlquery/tags/navigation/IndexTag.class.php index d819c5318..d51505fd9 100644 --- a/classes/xml/xmlquery/tags/navigation/IndexTag.class.php +++ b/classes/xml/xmlquery/tags/navigation/IndexTag.class.php @@ -1,12 +1,43 @@ argument_name = $index->attrs->var; diff --git a/classes/xml/xmlquery/tags/navigation/LimitTag.class.php b/classes/xml/xmlquery/tags/navigation/LimitTag.class.php index 8f3618057..c77c928c3 100644 --- a/classes/xml/xmlquery/tags/navigation/LimitTag.class.php +++ b/classes/xml/xmlquery/tags/navigation/LimitTag.class.php @@ -1,11 +1,38 @@ page && $index->page->attrs && $index->page_count && $index->page_count->attrs){ $this->page = new QueryArgument($index->page); diff --git a/classes/xml/xmlquery/tags/navigation/NavigationTag.class.php b/classes/xml/xmlquery/tags/navigation/NavigationTag.class.php index a428cad98..d5f66c873 100644 --- a/classes/xml/xmlquery/tags/navigation/NavigationTag.class.php +++ b/classes/xml/xmlquery/tags/navigation/NavigationTag.class.php @@ -1,11 +1,43 @@ order = array(); if($xml_navigation) { @@ -31,6 +63,10 @@ } } + /** + * NavigationTag object to string + * @return string + */ function getOrderByString(){ $output = 'array(' . PHP_EOL; foreach($this->order as $order){ @@ -41,6 +77,10 @@ return $output; } + /** + * LimitTag object to string + * @return string + */ function getLimitString(){ if ($this->limit) return $this->limit->toString(); else return ""; diff --git a/classes/xml/xmlquery/tags/query/QueryTag.class.php b/classes/xml/xmlquery/tags/query/QueryTag.class.php index f93c8059a..ef9dab3e2 100644 --- a/classes/xml/xmlquery/tags/query/QueryTag.class.php +++ b/classes/xml/xmlquery/tags/query/QueryTag.class.php @@ -1,26 +1,104 @@ action = $query->attrs->action; $this->query_id = $query->attrs->id; diff --git a/classes/xml/xmlquery/tags/table/HintTableTag.class.php b/classes/xml/xmlquery/tags/table/HintTableTag.class.php index 00196502a..2c23a786c 100644 --- a/classes/xml/xmlquery/tags/table/HintTableTag.class.php +++ b/classes/xml/xmlquery/tags/table/HintTableTag.class.php @@ -1,20 +1,26 @@ tag inside an XML Query file - * and the corresponding tag + * HintTableTag + * Models the tag inside an XML Query file and the corresponding tag * + * @author Arnia Sowftare + * @package /classes/xml/xmlquery/tags/table + * @version 0.1 */ - class HintTableTag extends TableTag { + /** + * Action for example, 'select', 'insert', 'delete'... + * @var array + */ var $index; - /** - * @brief Initialises Table Tag properties - * @param XML
tag $table - */ + /** + * constructor + * Initialises Table Tag properties + * @param object $table XML
tag + * @param array $index + * @return void + */ function HintTableTag($table, $index){ parent::TableTag($table); $this->index = $index; diff --git a/classes/xml/xmlquery/tags/table/TableTag.class.php b/classes/xml/xmlquery/tags/table/TableTag.class.php index e9ee67866..80fffac1f 100644 --- a/classes/xml/xmlquery/tags/table/TableTag.class.php +++ b/classes/xml/xmlquery/tags/table/TableTag.class.php @@ -1,34 +1,62 @@ tag inside an XML Query file + * TableTag + * Models the
tag inside an XML Query file + * @abstract + * Example + *
+ *
+ * Attributes + * name - name of the table - table prefix will be automatically added + * alias - table alias. If no value is specified, the table name will be set as default alias + * join_type - in case the table is part of a join clause, this specifies the type of join: left, right etc. + * - permitted values: 'left join','left outer join','right join','right outer join' + * Children + * Can have children of type * - * @abstract - * Example - *
- *
- * Attributes - * name - name of the table - table prefix will be automatically added - * alias - table alias. If no value is specified, the table name will be set as default alias - * join_type - in case the table is part of a join clause, this specifies the type of join: left, right etc. - * - permitted values: 'left join','left outer join','right join','right outer join' - * Children - * Can have children of type + * @author Arnia Sowftare + * @package /classes/xml/xmlquery/tags/table + * @version 0.1 */ - class TableTag { + /** + * Unescaped name + * @var string + */ var $unescaped_name; + /** + * name + * @var string + */ var $name; + /** + * alias + * @var string + */ var $alias; + /** + * Join type + * @example 'left join', 'left outer join', 'right join', 'right outer join' + * @var string + */ var $join_type; + /** + * Condition object + * @var object + */ var $conditions; + /** + * JoinConditionsTag + * @var JoinConditionsTag object + */ var $conditionsTag; - /** - * @brief Initialises Table Tag properties - * @param XML
tag $table - */ + + /** + * constructor + * Initialises Table Tag properties + * @param object $table XML
tag + * @return void + */ function TableTag($table){ $dbParser = DB::getParser(); @@ -60,12 +88,12 @@ return $this->unescaped_name; } - /** - * @brief Returns string for printing in PHP query cache file - * The string contains code for instantiation of either - * a Table or a JoinTable object - * @return string - */ + /** + * Returns string for printing in PHP query cache file + * The string contains code for instantiation of either + * a Table or a JoinTable object + * @return string + */ function getTableString(){ $dbParser = DB::getParser(); diff --git a/classes/xml/xmlquery/tags/table/TablesTag.class.php b/classes/xml/xmlquery/tags/table/TablesTag.class.php index 8c484e2e7..bd48e66d0 100644 --- a/classes/xml/xmlquery/tags/table/TablesTag.class.php +++ b/classes/xml/xmlquery/tags/table/TablesTag.class.php @@ -1,24 +1,34 @@ tag inside an XML Query file + * TablesTag class + * Models the tag inside an XML Query file + * @abstract + * Example + * + *
+ * + * Attributes + * None. + * Children + * Can have children of type
or * - * @abstract - * Example - * - *
- * - * Attributes - * None. - * Children - * Can have children of type
or + * @author Arnia Sowftare + * @package /classes/xml/xmlquery/tags/table + * @version 0.1 */ - class TablesTag { + /** + * Table list + * @var array + */ var $tables; + /** + * constructor + * @param object $xml_tables_tag + * @param object $xml_index_hints_tag + * @return void + */ function TablesTag($xml_tables_tag, $xml_index_hints_tag = NULL){ $this->tables = array();