ILIAS
release_5-0 Revision 5.0.0-1144-gc4397b1f870
◀ ilDoc Overview
class.ilNotificationUserIterator.php
Go to the documentation of this file.
1
<?php
2
3
require_once
'Services/Notifications/classes/class.ilNotificationSetupHelper.php'
;
4
8
class
ilNotificationUserIterator
implements
Iterator
{
9
10
private
$userids
;
11
private
$rset
;
12
private
$data
;
13
private
$module
;
14
15
public
function
__construct
(
$module
, array
$userids
= array()) {
16
global
$ilDB
;
17
18
$this->db =
$ilDB
;
19
$this->userids =
$userids
;
20
21
$this->module =
$module
;
22
23
$this->
rewind
();
24
}
25
26
public
function
__destruct
() {
27
$this->db->free($this->rset);
28
}
29
30
public
function
current
() {
31
return
$this->data
;
32
}
33
34
public
function
key
() {
35
return
(
int
)$this->data[
'usr_id'
];
36
}
37
38
public
function
next
() {
39
//$this->data = $this->db->fetchAssoc($this->rset);
40
}
41
42
public
function
rewind
() {
43
$query
=
'SELECT usr_id, module, channel FROM '
.
ilNotificationSetupHelper::$tbl_userconfig
.
' WHERE module=%s AND '
. $this->db->in(
'usr_id'
, $this->userids,
false
,
'integer'
);
44
$types = array(
'text'
);
45
$values = array($this->module);
46
$this->rset = $this->db->queryF(
$query
, $types, $values);
47
}
48
49
public
function
valid
() {
50
$this->data = $this->db->fetchAssoc($this->rset);
51
return
is_array($this->data);
52
}
53
}
54
?>
ilNotificationUserIterator\key
key()
Definition:
class.ilNotificationUserIterator.php:34
ilNotificationUserIterator\$rset
$rset
Definition:
class.ilNotificationUserIterator.php:11
ilNotificationUserIterator
wrapper for iterating a list of user settings by providing the user ids
Definition:
class.ilNotificationUserIterator.php:8
$query
$query
Definition:
examplelayouts.sql.php:24
ilNotificationUserIterator\__destruct
__destruct()
Definition:
class.ilNotificationUserIterator.php:26
ilNotificationUserIterator\current
current()
Definition:
class.ilNotificationUserIterator.php:30
ilNotificationUserIterator\next
next()
Definition:
class.ilNotificationUserIterator.php:38
ilNotificationUserIterator\valid
valid()
Definition:
class.ilNotificationUserIterator.php:49
ilNotificationUserIterator\rewind
rewind()
Definition:
class.ilNotificationUserIterator.php:42
ilNotificationSetupHelper\$tbl_userconfig
static $tbl_userconfig
Definition:
class.ilNotificationSetupHelper.php:10
ilNotificationUserIterator\$data
$data
Definition:
class.ilNotificationUserIterator.php:12
ilNotificationUserIterator\$module
$module
Definition:
class.ilNotificationUserIterator.php:13
Iterator
ilNotificationUserIterator\__construct
__construct($module, array $userids=array())
Definition:
class.ilNotificationUserIterator.php:15
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
ilNotificationUserIterator\$userids
$userids
Definition:
class.ilNotificationUserIterator.php:10
Services
Notifications
classes
class.ilNotificationUserIterator.php
Generated on Mon Aug 25 2025 19:00:46 for ILIAS by
1.8.13 (using
Doxyfile
)