mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-13 16:34:52 +09:00
add phpDoc comment
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10780 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
43999a0bb1
commit
ebc5edeec7
30 changed files with 830 additions and 161 deletions
|
|
@ -1,9 +1,25 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* ConditionArgument class
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @package /classes/xml/xmlquery/argument
|
||||
* @version 0.1
|
||||
*/
|
||||
class ConditionArgument extends Argument {
|
||||
/**
|
||||
* Operator keyword. for example 'in', 'notint', 'between'
|
||||
* @var string
|
||||
*/
|
||||
var $operation;
|
||||
|
||||
|
||||
/**
|
||||
* constructor
|
||||
* @param string $name
|
||||
* @param mixed $value
|
||||
* @param string $operation
|
||||
* @return void
|
||||
*/
|
||||
function ConditionArgument($name, $value, $operation){
|
||||
if(isset($value) && in_array($operation, array('in', 'notin','not_in', 'between')) && !is_array($value) && $value != ''){
|
||||
$value = str_replace(' ', '', $value);
|
||||
|
|
@ -14,6 +30,10 @@
|
|||
$this->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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue