ILIAS  release_8 Revision v8.24
MetaDataCollection.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use Iterator;
24
30{
34 protected array $items = [];
35
36 public function add(MetaDatum $meta_datum): void
37 {
38 $this->items[] = $meta_datum;
39 }
40
41 public function clear(): void
42 {
43 $this->items = [];
44 }
45
49 public function getItems(): Iterator
50 {
51 yield from $this->items;
52 }
53
57 public function getItemsAsKeyValuePairs(): array
58 {
59 $key_value_pairs = [];
60 array_walk($this->items, function (MetaDatum $d) use (&$key_value_pairs): void {
61 $key_value_pairs[$d->getKey()] = $d->getValue();
62 });
63 return $key_value_pairs;
64 }
65}
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...