ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Set.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25
26class Set extends BaseSet implements SetInterface
27{
29
30 public function __construct(
33 ) {
35 $this->ressource_id = $ressource_id;
36 }
37
39 {
41 }
42
43 public function getRoot(): ElementInterface
44 {
45 $root = parent::getRoot();
46 if ($root instanceof ElementInterface) {
47 return $root;
48 }
49 throw new \ilMDElementsException(
50 'Metadata set has invalid root element.'
51 );
52 }
53}
BaseElementInterface $root
Definition: BaseSet.php:25
RessourceIDInterface $ressource_id
Definition: Set.php:28
__construct(RessourceIDInterface $ressource_id, ElementInterface $root)
Definition: Set.php:30
getRessourceID()
Contains the information needed to identify the ILIAS object this metadata set belongs to.
Definition: Set.php:38
getRoot()
Returns the root element of the metadata set.
Definition: Set.php:43
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc