ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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

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

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

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

{
global $ilDB;
$this->db = $ilDB;
$this->userids = $userids;
$this->module = $module;
$this->rewind();
}

+ Here is the call graph for this function:

ilNotificationUserIterator::__destruct ( )

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

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

Member Function Documentation

ilNotificationUserIterator::current ( )

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

References $data.

{
return $this->data;
}
ilNotificationUserIterator::key ( )

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

{
return (int)$this->data['usr_id'];
}
ilNotificationUserIterator::next ( )

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

{
//$this->data = $this->db->fetchAssoc($this->rset);
}
ilNotificationUserIterator::rewind ( )

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

References $query, and ilNotificationSetupHelper\$tbl_userconfig.

Referenced by __construct().

{
$query = 'SELECT usr_id, module, channel FROM ' . ilNotificationSetupHelper::$tbl_userconfig . ' WHERE module=%s AND ' . $this->db->in('usr_id', $this->userids, false, 'integer');
$types = array('text');
$values = array($this->module);
$this->rset = $this->db->queryF($query, $types, $values);
}

+ Here is the caller graph for this function:

ilNotificationUserIterator::valid ( )

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

{
$this->data = $this->db->fetchAssoc($this->rset);
return is_array($this->data);
}

Field Documentation

ilNotificationUserIterator::$data
private

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

Referenced by current().

ilNotificationUserIterator::$module
private

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

Referenced by __construct().

ilNotificationUserIterator::$rset
private

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

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: