ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilNotificationUserIterator Class Reference

wrapper for iterating a list of user settings by providing the user ids More...

+ Inheritance diagram for ilNotificationUserIterator:
+ Collaboration diagram for ilNotificationUserIterator:

Public Member Functions

 __construct ($module, array $userids=array())
 
 __destruct ()
 
 current ()
 
 key ()
 
 next ()
 
 rewind ()
 
 valid ()
 

Private Attributes

 $userids
 
 $rset
 
 $data
 
 $module
 

Detailed Description

wrapper for iterating a list of user settings by providing the user ids

Definition at line 8 of file class.ilNotificationUserIterator.php.

Constructor & Destructor Documentation

◆ __construct()

ilNotificationUserIterator::__construct (   $module,
array  $userids = array() 
)

Definition at line 15 of file class.ilNotificationUserIterator.php.

References $ilDB, $module, $userids, and rewind().

16  {
17  global $ilDB;
18 
19  $this->db = $ilDB;
20  $this->userids = $userids;
21 
22  $this->module = $module;
23 
24  $this->rewind();
25  }
global $ilDB
+ Here is the call graph for this function:

◆ __destruct()

ilNotificationUserIterator::__destruct ( )

Definition at line 27 of file class.ilNotificationUserIterator.php.

28  {
29  $this->db->free($this->rset);
30  }

Member Function Documentation

◆ current()

ilNotificationUserIterator::current ( )

Definition at line 32 of file class.ilNotificationUserIterator.php.

References $data.

◆ key()

ilNotificationUserIterator::key ( )

Definition at line 37 of file class.ilNotificationUserIterator.php.

References data.

38  {
39  return (int) $this->data['usr_id'];
40  }
Add some data

◆ next()

ilNotificationUserIterator::next ( )

Definition at line 42 of file class.ilNotificationUserIterator.php.

43  {
44  //$this->data = $this->db->fetchAssoc($this->rset);
45  }

◆ rewind()

ilNotificationUserIterator::rewind ( )

Definition at line 47 of file class.ilNotificationUserIterator.php.

References $query, ilNotificationSetupHelper\$tbl_userconfig, and array.

Referenced by __construct().

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  }
$query
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ valid()

ilNotificationUserIterator::valid ( )

Definition at line 55 of file class.ilNotificationUserIterator.php.

References data.

56  {
57  $this->data = $this->db->fetchAssoc($this->rset);
58  return is_array($this->data);
59  }
Add some data

Field Documentation

◆ $data

ilNotificationUserIterator::$data
private

Definition at line 12 of file class.ilNotificationUserIterator.php.

Referenced by current().

◆ $module

ilNotificationUserIterator::$module
private

Definition at line 13 of file class.ilNotificationUserIterator.php.

Referenced by __construct().

◆ $rset

ilNotificationUserIterator::$rset
private

Definition at line 11 of file class.ilNotificationUserIterator.php.

◆ $userids

ilNotificationUserIterator::$userids
private

Definition at line 10 of file class.ilNotificationUserIterator.php.

Referenced by __construct().


The documentation for this class was generated from the following file: