mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
issue 2662 db class coding convention
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12216 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
3daadb29dc
commit
d77d426c4f
16 changed files with 863 additions and 772 deletions
|
|
@ -1,46 +1,52 @@
|
|||
<?php
|
||||
/**
|
||||
* ClickCountExpression
|
||||
* @author Arnia Software
|
||||
* @package /classes/db/queryparts/expression
|
||||
* @version 0.1
|
||||
*/
|
||||
class ClickCountExpression extends SelectExpression
|
||||
{
|
||||
/**
|
||||
* ClickCountExpression
|
||||
* @author Arnia Software
|
||||
* @package /classes/db/queryparts/expression
|
||||
* @version 0.1
|
||||
* click count
|
||||
* @var bool
|
||||
*/
|
||||
class ClickCountExpression extends SelectExpression {
|
||||
/**
|
||||
* click count
|
||||
* @var bool
|
||||
*/
|
||||
var $click_count;
|
||||
|
||||
/**
|
||||
* constructor
|
||||
* @param string $column_name
|
||||
* @param string $alias
|
||||
* @param bool $click_count
|
||||
* @return void
|
||||
*/
|
||||
function ClickCountExpression($column_name, $alias = NULL, $click_count = false){
|
||||
parent::SelectExpression($column_name, $alias);
|
||||
|
||||
if(!is_bool($click_count)){
|
||||
error_log("Click_count value for $column_name was not boolean", 0);
|
||||
$this->click_count = false;
|
||||
return;
|
||||
}
|
||||
$this->click_count = $click_count;
|
||||
}
|
||||
|
||||
function show() {
|
||||
return $this->click_count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return column expression, ex) column = column + 1
|
||||
* @return string
|
||||
*/
|
||||
function getExpression(){
|
||||
return "$this->column_name = $this->column_name + 1";
|
||||
var $click_count;
|
||||
|
||||
/**
|
||||
* constructor
|
||||
* @param string $column_name
|
||||
* @param string $alias
|
||||
* @param bool $click_count
|
||||
* @return void
|
||||
*/
|
||||
function ClickCountExpression($column_name, $alias = NULL, $click_count = false)
|
||||
{
|
||||
parent::SelectExpression($column_name, $alias);
|
||||
|
||||
if(!is_bool($click_count))
|
||||
{
|
||||
error_log("Click_count value for $column_name was not boolean", 0);
|
||||
$this->click_count = false;
|
||||
return;
|
||||
}
|
||||
$this->click_count = $click_count;
|
||||
}
|
||||
|
||||
?>
|
||||
function show()
|
||||
{
|
||||
return $this->click_count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return column expression, ex) column = column + 1
|
||||
* @return string
|
||||
*/
|
||||
function getExpression()
|
||||
{
|
||||
return "$this->column_name = $this->column_name + 1";
|
||||
}
|
||||
}
|
||||
|
||||
/* End of file ClickCountExpression.class.php */
|
||||
/* Location: ./classes/db/queryparts/expression/ClickCountExpression.class.php */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue