19 declare(strict_types=1);
    32         ?array $definition_array = null
    34         if ($this->depth > 20) {
    35             throw new \ilMDStructureException(
'LOM Structure is nested to deep.');
    37         if (!is_null($definition_array)) {
    47         return require(__DIR__ . 
"/../../../StructureDefinition/LOMStructure.php");
    64         $sub_definitions = $this->definition_array[
'sub'] ?? [];
    65         foreach ($this->definition_array[
'sub'] as $sub_definition) {
    74     protected function name(): string
    76         if (!isset($this->definition_array[
'name'])) {
    79         return $this->definition_array[
'name'];
    84         if (!isset($this->definition_array[
'unique'])) {
    87         return (
bool) $this->definition_array[
'unique'];
    93             !isset($this->definition_array[
'type']) ||
    94             is_null($type = $this->definition_array[
'type'])
   103         throw new \ilMDStructureException(
   104             'LOM definition is invalid:' . $error