ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilAwarenessUserCollection Class Reference

Represents a set of collected users. More...

+ Inheritance diagram for ilAwarenessUserCollection:
+ Collaboration diagram for ilAwarenessUserCollection:

Public Member Functions

 addUser ($a_id)
 Add user. More...
 
 removeUser ($a_id)
 Remove user. More...
 
 getUsers ()
 Get users. More...
 
 count ()
 

Static Public Member Functions

static getInstance ()
 Get instance. More...
 

Protected Attributes

 $users = array()
 

Detailed Description

Represents a set of collected users.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Member Function Documentation

◆ addUser()

ilAwarenessUserCollection::addUser (   $a_id)

Add user.

Parameters
integer$a_iduser id

Definition at line 31 of file class.ilAwarenessUserCollection.php.

Referenced by ilAwarenessUserProvider\addUserToCollection().

32  {
33  $this->users[$a_id] = $a_id;
34  }
+ Here is the caller graph for this function:

◆ count()

ilAwarenessUserCollection::count ( )

Definition at line 61 of file class.ilAwarenessUserCollection.php.

62  {
63  return count($this->users);
64  }

◆ getInstance()

static ilAwarenessUserCollection::getInstance ( )
static

Get instance.

Returns
ilAwarenessUserCollection user collection

Definition at line 21 of file class.ilAwarenessUserCollection.php.

Referenced by ilAwarenessUserCollector\collectUsers(), and ilAwarenessUserProvider\collectUsers().

22  {
23  return new ilAwarenessUserCollection();
24  }
Represents a set of collected users.
+ Here is the caller graph for this function:

◆ getUsers()

ilAwarenessUserCollection::getUsers ( )

Get users.

Returns
array array of user ids (integer)

Definition at line 53 of file class.ilAwarenessUserCollection.php.

References $users.

◆ removeUser()

ilAwarenessUserCollection::removeUser (   $a_id)

Remove user.

Parameters
integer$a_iduser id

Definition at line 41 of file class.ilAwarenessUserCollection.php.

42  {
43  if (isset($this->users[$a_id])) {
44  unset($this->users[$a_id]);
45  }
46  }

Field Documentation

◆ $users

ilAwarenessUserCollection::$users = array()
protected

Definition at line 14 of file class.ilAwarenessUserCollection.php.

Referenced by getUsers().


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