ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Standard.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
27class Standard implements ReaderInterface
28{
31
32 public function __construct(
35 ) {
36 $this->structurally_coupled = $structurally_coupled;
37 $this->legacy = $legacy;
38 }
39
40 public function read(
41 \SimpleXMLElement $xml,
43 ): SetInterface {
44 switch ($version) {
45 case Version::V4_1_0:
46 return $this->legacy->read($xml, $version);
47
48 case Version::V10_0:
49 default:
50 return $this->structurally_coupled->read($xml, $version);
51 }
52 }
53}
$version
Definition: plugin.php:24
read(\SimpleXMLElement $xml, Version $version)
Definition: Standard.php:40
__construct(ReaderInterface $structurally_coupled, ReaderInterface $legacy)
Definition: Standard.php:32