src/LdapTools/Schema/Parser/SchemaYamlParser.php
protected function getObjectFromSchema(array $schema, $objectType)
    {
        $objectSchema = null;
        foreach ($schema['objects'] as $ldapObject) {
            if (array_key_exists('type', $ldapObject) && strtolower($ldapObject['type']) == strtolower($objectType)) {
                $objectSchema = $ldapObject;
            }
        }
        if (is_null($objectSchema)) {
            throw new SchemaParserException(sprintf('Cannot find object type "%s" in schema.', $objectType));
        }

        return $objectSchema;
    }
protected function getObjectFromSchema(array $schema, $objectType)
    {
        $objectSchema = null;
        foreach ($schema['objects'] as $ldapObject) {
            if (array_key_exists('type', $ldapObject) && strtolower($ldapObject['type']) == strtolower($objectType)) {
                $objectSchema = $ldapObject;
            }
        }
        if (is_null($objectSchema)) {
            throw new SchemaParserException(sprintf('Cannot find object type "%s" in schema.', $objectType));
        }

        return $objectSchema;
    }
protected function getObjectFromSchema ( array $ schema , $ objectType ) { $ objectSchema = null ; foreach ( $ schema [ 'objects' ] as $ ldapObject ) { if ( array_key_exists ( 'type' , $ ldapObject ) && strtolower ( $ ldapObject [ 'type' ] ) == strtolower ( $ objectType ) ) { $ objectSchema = $ ldapObject ; } } if ( is_null ( $ objectSchema ) ) { throw new SchemaParserException ( sprintf ( 'Cannot find object type "%s" in schema.' , $ objectType ) ) ; } return $ objectSchema ; }
Check for a specific object type in the schema and validate it.

@param array $schema
@param string $objectType
@return array
@throws SchemaParserException
Check for a specific object type in the schema and validate it .