src/LdapTools/Schema/Parser/SchemaYamlParser.php
protected function validateSchemaType(LdapObjectSchema $schema, array $schemaArray)
    {
        if (!((bool)count(array_filter(array_keys($schemaArray['attributes']), 'is_string')))) {
            throw new SchemaParserException('The attributes for a schema should be an associative array.');
        }
        if ($schema->getScope() && !in_array($schema->getScope(), QueryOperation::SCOPE)) {
            throw new SchemaParserException(sprintf(
                'The scope "%s" is not valid. Valid types are: %s',
                $schema->getScope(),
                implode(', ', QueryOperation::SCOPE)
            ));
        }
    }
protected function validateSchemaType(LdapObjectSchema $schema, array $schemaArray)
    {
        if (!((bool)count(array_filter(array_keys($schemaArray['attributes']), 'is_string')))) {
            throw new SchemaParserException('The attributes for a schema should be an associative array.');
        }
        if ($schema->getScope() && !in_array($schema->getScope(), QueryOperation::SCOPE)) {
            throw new SchemaParserException(sprintf(
                'The scope "%s" is not valid. Valid types are: %s',
                $schema->getScope(),
                implode(', ', QueryOperation::SCOPE)
            ));
        }
    }
protected function validateSchemaType ( LdapObjectSchema $ schema , array $ schemaArray ) { if ( ! ( ( bool ) count ( array_filter ( array_keys ( $ schemaArray [ 'attributes' ] ) , 'is_string' ) ) ) ) { throw new SchemaParserException ( 'The attributes for a schema should be an associative array.' ) ; } if ( $ schema -> getScope ( ) && ! in_array ( $ schema -> getScope ( ) , QueryOperation :: SCOPE ) ) { throw new SchemaParserException ( sprintf ( 'The scope "%s" is not valid. Valid types are: %s' , $ schema -> getScope ( ) , implode ( ', ' , QueryOperation :: SCOPE ) ) ) ; } }
Validates some of the schema values to check that they are allowed.

@param LdapObjectSchema $schema
@param array $schemaArray
@throws SchemaParserException
Validates some of the schema values to check that they are allowed .