ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
LP.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=0);
20
22
25
26class LP implements LPInterface
27{
28 protected int $index;
32 protected array $elements;
33
34 public function __construct(
35 LPInfoInterface ...$elements
36 ) {
37 $this->index = 0;
38 $this->elements = $elements;
39 }
40
41 public function current(): LPInfoInterface
42 {
43 return $this->elements[$this->index];
44 }
45
46 public function key(): int
47 {
48 return $this->index;
49 }
50
51 public function valid(): bool
52 {
53 return isset($this->elements[$this->index]);
54 }
55
56 public function rewind(): void
57 {
58 $this->index = 0;
59 }
60
61 public function next(): void
62 {
63 $this->index++;
64 }
65}
__construct(LPInfoInterface ... $elements)
Definition: LP.php:34