src/LdapTools/Schema/Parser/SchemaYamlParser.php
protected function parseYamlForObject(array $schema, $schemaName, $objectType)
    {
        $objectSchema = $this->getObjectFromSchema($schema, $objectType);
        $objectSchema = $this->mergeAnyExtendedSchemas($objectSchema, $schemaName);
        $objectSchema = $this->cleanObjectArray($objectSchema);
        $this->updateObjectArray($schemaName, $objectSchema);
        $this->validateObjectDirectives($schemaName, $objectType, $objectSchema);
        
        $ldapObjectSchema = new LdapObjectSchema($schemaName, $objectSchema['type']);
        foreach ($this->optionMap as $option => $setter) {
            if (!array_key_exists($option, $objectSchema)) {
                continue;
            }
            $value = $objectSchema[$option];
            if (array_key_exists($option, $this->normalizer)) {
                $value = $this->{$this->normalizer[$option]}($value);
            }
            $ldapObjectSchema->$setter($value);
        }
        $this->parseConverterOptions($ldapObjectSchema, $objectSchema);
        $ldapObjectSchema->setFilter($this->parseFilter($ldapObjectSchema, $objectSchema));
        $ldapObjectSchema->setAttributeMap(isset($objectSchema['attributes']) ? $objectSchema['attributes'] : []);
        $ldapObjectSchema->setConverterMap($this->parseConverterMap($objectSchema));
        $ldapObjectSchema->setControls(...$this->parseControls($objectSchema));
        $this->validateObjectSchema($ldapObjectSchema);

        return $ldapObjectSchema;
    }
protected function parseYamlForObject(array $schema, $schemaName, $objectType)
    {
        $objectSchema = $this->getObjectFromSchema($schema, $objectType);
        $objectSchema = $this->mergeAnyExtendedSchemas($objectSchema, $schemaName);
        $objectSchema = $this->cleanObjectArray($objectSchema);
        $this->updateObjectArray($schemaName, $objectSchema);
        $this->validateObjectDirectives($schemaName, $objectType, $objectSchema);
        
        $ldapObjectSchema = new LdapObjectSchema($schemaName, $objectSchema['type']);
        foreach ($this->optionMap as $option => $setter) {
            if (!array_key_exists($option, $objectSchema)) {
                continue;
            }
            $value = $objectSchema[$option];
            if (array_key_exists($option, $this->normalizer)) {
                $value = $this->{$this->normalizer[$option]}($value);
            }
            $ldapObjectSchema->$setter($value);
        }
        $this->parseConverterOptions($ldapObjectSchema, $objectSchema);
        $ldapObjectSchema->setFilter($this->parseFilter($ldapObjectSchema, $objectSchema));
        $ldapObjectSchema->setAttributeMap(isset($objectSchema['attributes']) ? $objectSchema['attributes'] : []);
        $ldapObjectSchema->setConverterMap($this->parseConverterMap($objectSchema));
        $ldapObjectSchema->setControls(...$this->parseControls($objectSchema));
        $this->validateObjectSchema($ldapObjectSchema);

        return $ldapObjectSchema;
    }
protected function parseYamlForObject ( array $ schema , $ schemaName , $ objectType ) { $ objectSchema = $ this -> getObjectFromSchema ( $ schema , $ objectType ) ; $ objectSchema = $ this -> mergeAnyExtendedSchemas ( $ objectSchema , $ schemaName ) ; $ objectSchema = $ this -> cleanObjectArray ( $ objectSchema ) ; $ this -> updateObjectArray ( $ schemaName , $ objectSchema ) ; $ this -> validateObjectDirectives ( $ schemaName , $ objectType , $ objectSchema ) ; $ ldapObjectSchema = new LdapObjectSchema ( $ schemaName , $ objectSchema [ 'type' ] ) ; foreach ( $ this -> optionMap as $ option => $ setter ) { if ( ! array_key_exists ( $ option , $ objectSchema ) ) { continue ; } $ value = $ objectSchema [ $ option ] ; if ( array_key_exists ( $ option , $ this -> normalizer ) ) { $ value = $ this -> { $ this -> normalizer [ $ option ] } ( $ value ) ; } $ ldapObjectSchema -> $ setter ( $ value ) ; } $ this -> parseConverterOptions ( $ ldapObjectSchema , $ objectSchema ) ; $ ldapObjectSchema -> setFilter ( $ this -> parseFilter ( $ ldapObjectSchema , $ objectSchema ) ) ; $ ldapObjectSchema -> setAttributeMap ( isset ( $ objectSchema [ 'attributes' ] ) ? $ objectSchema [ 'attributes' ] : [ ] ) ; $ ldapObjectSchema -> setConverterMap ( $ this -> parseConverterMap ( $ objectSchema ) ) ; $ ldapObjectSchema -> setControls ( ... $ this -> parseControls ( $ objectSchema ) ) ; $ this -> validateObjectSchema ( $ ldapObjectSchema ) ; return $ ldapObjectSchema ; }
Attempt to find the object type definition in the schema and create its object representation.

@param array $schema
@param string $schemaName
@param string $objectType
@return LdapObjectSchema
@throws SchemaParserException
Attempt to find the object type definition in the schema and create its object representation .