ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
BaseSet.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23abstract class BaseSet implements BaseSetInterface
24{
26
28 {
29 if (!$root->isRoot() || $root->getSuperElement()) {
30 throw new \ilMDElementsException(
31 'Metadata sets must be created from a root element.'
32 );
33 }
34 $this->root = $root;
35 }
36
37 public function __clone()
38 {
39 $this->root = clone $this->root;
40 }
41
42 public function getRoot(): BaseElementInterface
43 {
44 return $this->root;
45 }
46}
getRoot()
Returns the root element of the metadata set.
Definition: BaseSet.php:42
__construct(BaseElementInterface $root)
Definition: BaseSet.php:27
BaseElementInterface $root
Definition: BaseSet.php:25