19 declare(strict_types=1);
36 'name' =>
'sub string',
38 'type' => Type::STRING,
42 'name' =>
'sub language',
47 'name' =>
'sub sub duration',
56 return new class ($initial_array) extends
LOMReader {
57 public function __construct(
protected array $initial_array)
62 protected function getDefinitionArray(): array
64 return $this->initial_array;
72 $definition = $reader->definition();
79 $definition->dataType()
81 $this->assertTrue($definition->unique());
87 $first_reader = $sub_readers->current();
89 $second_reader = $sub_readers->current();
91 $third_reader = $sub_readers->current();
93 $definition = $first_reader->definition();
100 $definition->dataType()
102 $this->assertFalse($definition->unique());
104 $definition = $second_reader->definition();
111 $definition->dataType()
113 $this->assertTrue($definition->unique());
115 $this->assertNull($third_reader);
116 $this->assertNull($first_reader->subDefinitions()->current());
117 $this->assertInstanceOf(
119 $second_reader->subDefinitions()->current()
__construct()
Constructor setup ILIAS global object public.
__construct(Container $dic, ilPlugin $plugin)