ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Standard.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 
27 class Standard implements ReaderInterface
28 {
31 
32  public function __construct(
33  ReaderInterface $structurally_coupled,
34  ReaderInterface $legacy
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
legacy()
expected output: > ILIAS shows the rendered Component.
Definition: legacy.php:29
__construct(ReaderInterface $structurally_coupled, ReaderInterface $legacy)
Definition: Standard.php:32