XOOPS
2.6.0
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
CriteriaElement.php
Go to the documentation of this file.
1
<?php
2
/*
3
You may not change or alter any portion of this comment or credits
4
of supporting developers from this source code or any supporting source code
5
which is considered copyrighted (c) material of the original comment or credit authors.
6
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
*/
11
12
namespace
Xoops\Core\Kernel
;
13
14
use
Doctrine\DBAL\Query\QueryBuilder
;
15
31
abstract
class
CriteriaElement
32
{
38
protected
$order
=
'ASC'
;
39
43
protected
$sort
=
''
;
44
50
protected
$limit
= 0;
51
57
protected
$start
= 0;
58
62
protected
$groupby
=
''
;
63
64
70
abstract
public
function
render
();
71
77
abstract
public
function
renderWhere
();
78
84
abstract
public
function
renderLdap
();
85
95
abstract
public
function
renderQb
(
QueryBuilder
$qb = null, $whereMode =
''
);
96
109
abstract
public
function
buildExpressionQb
(
QueryBuilder
$qb);
110
118
public
function
setSort
(
$sort
)
119
{
120
$this->sort =
$sort
;
121
}
122
128
public
function
getSort
()
129
{
130
return
$this->sort
;
131
}
132
140
public
function
setOrder
(
$order
)
141
{
142
if
(is_string(
$order
)) {
143
$order
= strtoupper(
$order
);
144
if
(in_array(
$order
, array(
'ASC'
,
'DESC'
))) {
145
$this->order =
$order
;
146
}
147
}
148
}
149
155
public
function
getOrder
()
156
{
157
return
$this->order
;
158
}
159
167
public
function
setLimit
(
$limit
= 0)
168
{
169
$this->limit = intval(
$limit
);
170
}
171
177
public
function
getLimit
()
178
{
179
return
$this->limit
;
180
}
181
189
public
function
setStart
(
$start
= 0)
190
{
191
$this->start = intval(
$start
);
192
}
193
199
public
function
getStart
()
200
{
201
return
$this->start
;
202
}
203
211
public
function
setGroupby
($group)
212
{
213
$this->groupby = $group;
214
}
215
221
public
function
getGroupby
()
222
{
223
return
isset($this->groupby) ? $this->groupby :
""
;
224
}
225
}
Xoops\Core\Kernel\CriteriaElement\getLimit
getLimit()
Definition:
CriteriaElement.php:177
Xoops\Core\Kernel\CriteriaElement\getGroupby
getGroupby()
Definition:
CriteriaElement.php:221
Xoops\Core\Kernel\CriteriaElement\setStart
setStart($start=0)
Definition:
CriteriaElement.php:189
Xoops\Core\Kernel\CriteriaElement\getSort
getSort()
Definition:
CriteriaElement.php:128
Xoops\Core\Kernel\CriteriaElement\$groupby
$groupby
Definition:
CriteriaElement.php:62
Xoops\Core\Kernel\CriteriaElement\renderLdap
renderLdap()
Xoops\Core\Kernel\CriteriaElement\renderQb
renderQb(QueryBuilder $qb=null, $whereMode= '')
Xoops\Core\Kernel\CriteriaElement\$sort
$sort
Definition:
CriteriaElement.php:43
Xoops\Core\Kernel\CriteriaElement\$limit
$limit
Definition:
CriteriaElement.php:50
Xoops\Core\Kernel\CriteriaElement\getStart
getStart()
Definition:
CriteriaElement.php:199
Xoops\Core\Kernel\CriteriaElement\setOrder
setOrder($order)
Definition:
CriteriaElement.php:140
Xoops\Core\Kernel\CriteriaElement
Definition:
CriteriaElement.php:31
Xoops\Core\Kernel\CriteriaElement\$order
$order
Definition:
CriteriaElement.php:38
Xoops\Core\Kernel\CriteriaElement\buildExpressionQb
buildExpressionQb(QueryBuilder $qb)
QueryBuilder
Xoops\Core\Kernel\CriteriaElement\render
render()
Xoops\Core\Kernel\CriteriaElement\setSort
setSort($sort)
Definition:
CriteriaElement.php:118
Xoops\Core\Kernel\CriteriaElement\renderWhere
renderWhere()
Xoops\Core\Kernel\CriteriaElement\getOrder
getOrder()
Definition:
CriteriaElement.php:155
Xoops\Core\Kernel
Definition:
Criteria.php:12
Xoops\Core\Kernel\CriteriaElement\$start
$start
Definition:
CriteriaElement.php:57
QueryBuilder
Xoops\Core\Kernel\CriteriaElement\setGroupby
setGroupby($group)
Definition:
CriteriaElement.php:211
Xoops\Core\Kernel\CriteriaElement\setLimit
setLimit($limit=0)
Definition:
CriteriaElement.php:167
usr64
htdocs
xoops_lib
Xoops
Core
Kernel
CriteriaElement.php
Generated on Fri May 22 2015 03:07:05 for XOOPS by
1.8.9.1