ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.Collection.php
Go to the documentation of this file.
1 <?php
2 
20 
25 class Collection implements \Countable
26 {
28  protected array $users = array();
29 
33  public function addUser(int $a_id): void
34  {
35  $this->users[$a_id] = $a_id;
36  }
37 
41  public function removeUser(int $a_id): void
42  {
43  if (isset($this->users[$a_id])) {
44  unset($this->users[$a_id]);
45  }
46  }
47 
51  public function getUsers(): array
52  {
53  return $this->users;
54  }
55 
56  public function count(): int
57  {
58  return count($this->users);
59  }
60 }
Represents a set of collected users.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...