ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
CollectionData.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
27class CollectionData extends Data
28{
29 public function __construct(array $data = [])
30 {
31 // check fopr array to have two keys: rcid and rid
32 if (!array_key_exists('rcid', $data) || !array_key_exists('rid', $data)) {
33 throw new \InvalidArgumentException('CollectionData must contain rcid and rid');
34 }
35
36 parent::__construct($data, \ArrayObject::ARRAY_AS_PROPS);
37 }
38
39 public function getRcid(): string
40 {
41 return $this['rcid'];
42 }
43
44 public function getRid(): string
45 {
46 return $this['rid'];
47 }
48}
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc