Class ilTermsOfServiceTableDatabaseDataProvider.
More...
◆ __construct()
ilTermsOfServiceTableDatabaseDataProvider::__construct |
( |
\ilDBInterface |
$db | ) |
|
◆ getFromPart()
ilTermsOfServiceTableDatabaseDataProvider::getFromPart |
( |
array |
$params, |
|
|
array |
$filter |
|
) |
| |
|
abstractprotected |
◆ getGroupByPart()
ilTermsOfServiceTableDatabaseDataProvider::getGroupByPart |
( |
array |
$params, |
|
|
array |
$filter |
|
) |
| |
|
abstractprotected |
◆ getHavingPart()
ilTermsOfServiceTableDatabaseDataProvider::getHavingPart |
( |
array |
$params, |
|
|
array |
$filter |
|
) |
| |
|
abstractprotected |
◆ getList()
ilTermsOfServiceTableDatabaseDataProvider::getList |
( |
array |
$params, |
|
|
array |
$filter |
|
) |
| |
- Parameters
-
array | $params | |
array | $filter | |
- Returns
- array
- Exceptions
-
Implements ilTermsOfServiceTableDataProvider.
Definition at line 71 of file class.ilTermsOfServiceTableDatabaseDataProvider.php.
References $data, $from, $query, $res, $row, getFromPart(), getGroupByPart(), getHavingPart(), getOrderByPart(), getSelectPart(), and getWherePart().
86 if (!is_numeric(
$params[
'limit'])) {
87 throw new \InvalidArgumentException(
'Please provide a valid numerical limit.');
90 if (!isset(
$params[
'offset'])) {
93 if (!is_numeric(
$params[
'offset'])) {
94 throw new \InvalidArgumentException(
'Please provide a valid numerical offset.');
101 $where = strlen($where) ?
'WHERE ' . $where :
'';
102 $query =
"SELECT {$select} FROM {$from} {$where}";
104 if (strlen($group)) {
105 $query .=
" GROUP BY {$group}";
108 if (strlen($having)) {
109 $query .=
" HAVING {$having}";
112 if (strlen($order)) {
113 $query .=
" ORDER BY {$order}";
117 while (
$row = $this->db->fetchAssoc(
$res)) {
122 $cnt_sql =
"SELECT COUNT(*) cnt FROM ({$query}) subquery";
123 $row_cnt = $this->db->fetchAssoc($this->db->query($cnt_sql));
124 $data[
'cnt'] = $row_cnt[
'cnt'];
getSelectPart(array $params, array $filter)
getOrderByPart(array $params, array $filter)
getGroupByPart(array $params, array $filter)
getHavingPart(array $params, array $filter)
getFromPart(array $params, array $filter)
foreach($_POST as $key=> $value) $res
getWherePart(array $params, array $filter)
◆ getOrderByPart()
ilTermsOfServiceTableDatabaseDataProvider::getOrderByPart |
( |
array |
$params, |
|
|
array |
$filter |
|
) |
| |
|
abstractprotected |
◆ getSelectPart()
ilTermsOfServiceTableDatabaseDataProvider::getSelectPart |
( |
array |
$params, |
|
|
array |
$filter |
|
) |
| |
|
abstractprotected |
◆ getWherePart()
ilTermsOfServiceTableDatabaseDataProvider::getWherePart |
( |
array |
$params, |
|
|
array |
$filter |
|
) |
| |
|
abstractprotected |
◆ $db
ilTermsOfServiceTableDatabaseDataProvider::$db |
|
protected |
The documentation for this class was generated from the following file: