ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ 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
{
17
global
$ilDB
;
18
19
$this->db =
$ilDB
;
20
$this->userids =
$userids
;
21
22
$this->module =
$module
;
23
24
$this->
rewind
();
25
}
26
27
public
function
__destruct
()
28
{
29
$this->db->free($this->rset);
30
}
31
32
public
function
current
()
33
{
34
return
$this->data
;
35
}
36
37
public
function
key
()
38
{
39
return
(
int
) $this->
data
[
'usr_id'
];
40
}
41
42
public
function
next
()
43
{
44
//$this->data = $this->db->fetchAssoc($this->rset);
45
}
46
47
public
function
rewind
()
48
{
49
$query
=
'SELECT usr_id, module, channel FROM '
.
ilNotificationSetupHelper::$tbl_userconfig
.
' WHERE module=%s AND '
. $this->db->in(
'usr_id'
, $this->userids,
false
,
'integer'
);
50
$types =
array
(
'text'
);
51
$values =
array
($this->module);
52
$this->rset = $this->db->queryF(
$query
, $types, $values);
53
}
54
55
public
function
valid
()
56
{
57
$this->
data
= $this->db->fetchAssoc($this->rset);
58
return
is_array($this->
data
);
59
}
60
}
data
Add some data
Definition:
01pharSimple.php:56
ilNotificationUserIterator\key
key()
Definition:
class.ilNotificationUserIterator.php:37
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
ilNotificationUserIterator\__destruct
__destruct()
Definition:
class.ilNotificationUserIterator.php:27
ilNotificationUserIterator\current
current()
Definition:
class.ilNotificationUserIterator.php:32
ilNotificationUserIterator\next
next()
Definition:
class.ilNotificationUserIterator.php:42
ilNotificationUserIterator\valid
valid()
Definition:
class.ilNotificationUserIterator.php:55
ilNotificationUserIterator\rewind
rewind()
Definition:
class.ilNotificationUserIterator.php:47
ilNotificationSetupHelper\$tbl_userconfig
static $tbl_userconfig
Definition:
class.ilNotificationSetupHelper.php:10
ilNotificationUserIterator\$data
$data
Definition:
class.ilNotificationUserIterator.php:12
$query
$query
Definition:
proxy_ylocal.php:13
ilNotificationUserIterator\$module
$module
Definition:
class.ilNotificationUserIterator.php:13
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
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 Sat Jan 18 2025 19:01:35 for ILIAS by
1.8.13 (using
Doxyfile
)