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:
ovclas 2012-06-19 08:53:24 +00:00
parent 43999a0bb1
commit ebc5edeec7
30 changed files with 830 additions and 161 deletions

View file

@ -1,17 +1,57 @@
<?php
/**
* Argument class
* @author NHN (developers@xpressengine.com)
* @package /classes/xml/xmlquery/argument
* @version 0.1
*/
class Argument {
/**
* argument value
* @var mixed
*/
var $value;
/**
* argument name
* @var string
*/
var $name;
/**
* argument type
* @var string
*/
var $type;
/**
* result of argument type check
* @var bool
*/
var $isValid;
/**
* error message
* @var Object
*/
var $errorMessage;
/**
* column operation
*/
var $column_operation;
var $uses_default_value; // Check if arg value is user submnitted or default
var $_value; // Caches escaped and toString value so that the parsing won't happen multiple times;
/**
* Check if arg value is user submnitted or default
* @var mixed
*/
var $uses_default_value;
/**
* Caches escaped and toString value so that the parsing won't happen multiple times
* @var mixed
*/
var $_value; //
/**
* constructor
* @param string $name
* @param mixed $value
* @return void
*/
function Argument($name, $value) {
$this->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;