ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilNotificationHandlerIterator.php
Go to the documentation of this file.
1 <?php
2 
4 
5  private $items = array();
6  private $index = 0;
7 
8  public function __construct(array $items = array()) {
9  $this->items = $items;
10  }
11 
12  public function addItem(ilNotificationHandler $handler) {
13  $this->items[] = $handler;
14  }
15 
20  public function current() {
21  return $this->items[$this->index];
22  }
23 
28  public function key() {
29  return $this->index;
30  }
31 
32  public function next() {
33  $this->index++;
34  }
35 
36  public function rewind() {
37  $this->index = 0;
38  }
39 
44  public function valid() {
45  return $this->index < count($this->items);
46  }
47 }
48 ?>