ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilAwarenessUserCollection.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
12 class ilAwarenessUserCollection implements \Countable
13 {
14  protected $users = array();
15 
21  public static function getInstance()
22  {
23  return new ilAwarenessUserCollection();
24  }
25 
31  public function addUser($a_id)
32  {
33  $this->users[$a_id] = $a_id;
34  }
35 
41  public function removeUser($a_id)
42  {
43  if (isset($this->users[$a_id])) {
44  unset($this->users[$a_id]);
45  }
46  }
47 
53  public function getUsers()
54  {
55  return $this->users;
56  }
57 
61  public function count()
62  {
63  return count($this->users);
64  }
65 }
Represents a set of collected users.