XpressEngine Core
1.11.2
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Pages
classes
db
queryparts
limit
Limit.class.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (C) NAVER <http://www.navercorp.com> */
3
9
class
Limit
10
{
11
16
var
$start
;
17
22
var
$list_count
;
23
28
var
$page_count
;
29
34
var
$page
;
35
44
function
__construct
(
$list_count
,
$page
= NULL,
$page_count
= NULL, $offset = NULL)
45
{
46
$this->list_count =
$list_count
;
47
if
(
$page
)
48
{
49
$list_count_value =
$list_count
->getValue();
50
$page_value =
$page
->getValue();
51
$this->start = ($page_value - 1) * $list_count_value;
52
$this->page_count =
$page_count
;
53
$this->
page
=
$page
;
54
}
55
elseif($offset)
56
{
57
$this->start = $offset->getValue();
58
}
59
}
60
65
function
isPageHandler
()
66
{
67
if
($this->
page
)
68
{
69
return
true
;
70
}
71
else
72
{
73
return
false
;
74
}
75
}
76
77
function
getOffset
()
78
{
79
return
$this->start
;
80
}
81
82
function
getLimit
()
83
{
84
return
$this->list_count->getValue();
85
}
86
87
function
toString
()
88
{
89
if
($this->
page
|| $this->start)
90
{
91
return
$this->start .
' , '
. $this->list_count->getValue();
92
}
93
else
94
{
95
return
$this->list_count->getValue();
96
}
97
}
98
99
}
100
/* End of file Limit.class.php */
101
/* Location: ./classes/db/limit/Limit.class.php */
Limit\toString
toString()
Definition:
Limit.class.php:87
page
high class of the module page
Definition:
page.class.php:8
Limit\isPageHandler
isPageHandler()
Definition:
Limit.class.php:65
Limit\$list_count
$list_count
Definition:
Limit.class.php:22
Limit\$page_count
$page_count
Definition:
Limit.class.php:28
Limit
Definition:
Limit.class.php:9
Limit\getLimit
getLimit()
Definition:
Limit.class.php:82
Limit\__construct
__construct($list_count, $page=NULL, $page_count=NULL, $offset=NULL)
Definition:
Limit.class.php:44
Limit\$start
$start
Definition:
Limit.class.php:16
Limit\getOffset
getOffset()
Definition:
Limit.class.php:77
Limit\$page
$page
Definition:
Limit.class.php:34
Generated on Tue Dec 18 2018 17:04:25 for XpressEngine Core by
1.8.5