issue 2119. supporting php 5.4. db classes.

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12686 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2013-02-04 09:36:46 +00:00
parent 7fe03148f0
commit 41fdaf00c3
29 changed files with 1846 additions and 798 deletions

View file

@ -1,4 +1,5 @@
<?php
<?php
/**
* @author NHN (developers@xpressengine.com)
* @package /classes/db/queryparts/limit
@ -6,21 +7,25 @@
*/
class Limit
{
/**
* start number
* @var int
*/
var $start;
/**
* list count
* @var int
*/
var $list_count;
/**
* page count
* @var int
*/
var $page_count;
/**
* current page
* @var int
@ -34,10 +39,10 @@ class Limit
* @param int $page_count
* @return void
*/
function Limit($list_count, $page= NULL, $page_count= NULL)
function Limit($list_count, $page = NULL, $page_count = NULL)
{
$this->list_count = $list_count;
if ($page)
if($page)
{
$list_count_value = $list_count->getValue();
$page_value = $page->getValue();
@ -53,8 +58,14 @@ class Limit
*/
function isPageHandler()
{
if ($this->page)return true;
else return false;
if($this->page)
{
return true;
}
else
{
return false;
}
}
function getOffset()
@ -69,9 +80,16 @@ class Limit
function toString()
{
if ($this->page) return $this->start . ' , ' . $this->list_count->getValue();
else return $this->list_count->getValue();
if($this->page)
{
return $this->start . ' , ' . $this->list_count->getValue();
}
else
{
return $this->list_count->getValue();
}
}
}
/* End of file Limit.class.php */
/* Location: ./classes/db/limit/Limit.class.php */