19 declare(strict_types=1);
39 $this->elements = $initial_elements;
45 return count($this->elements);
48 public function current(): ilXMLFileHandlerInterface
53 public function next(): void
65 return 0 <= $this->index && $this->index < $this->
count();
73 public function withMerged(ilXMLFileHandlerCollectionInterface $other): ilXMLFileHandlerCollectionInterface
76 $clone->elements = array_merge($clone->toArray(), $other->toArray());
80 public function withElement(ilXMLFileHandlerInterface $element): ilXMLFileHandlerCollectionInterface
83 $clone->elements[] = $element;
withElement(ilXMLFileHandlerInterface $element)
withMerged(ilXMLFileHandlerCollectionInterface $other)
__construct(array $initial_elements=[])