src/StorageMetadataFactory.php
private function validateSchemata(EntityMetadata $metadata)
    {
        $persistence = $metadata->persistence;
        foreach ($persistence->schemata as $k => $schema) {
            if (!isset($schema['keys']) || empty($schema['keys'])) {
                throw MetadataException::invalidMetadata($metadata->type, 'At least one key must be specified to define an index.');
            }
            $persistence->schemata[$k]['options']['name'] = sprintf('modlr_%s', md5(json_encode($schema)));
        }
    }
private function validateSchemata(EntityMetadata $metadata)
    {
        $persistence = $metadata->persistence;
        foreach ($persistence->schemata as $k => $schema) {
            if (!isset($schema['keys']) || empty($schema['keys'])) {
                throw MetadataException::invalidMetadata($metadata->type, 'At least one key must be specified to define an index.');
            }
            $persistence->schemata[$k]['options']['name'] = sprintf('modlr_%s', md5(json_encode($schema)));
        }
    }
private function validateSchemata ( EntityMetadata $ metadata ) { $ persistence = $ metadata -> persistence ; foreach ( $ persistence -> schemata as $ k => $ schema ) { if ( ! isset ( $ schema [ 'keys' ] ) || empty ( $ schema [ 'keys' ] ) ) { throw MetadataException :: invalidMetadata ( $ metadata -> type , 'At least one key must be specified to define an index.' ) ; } $ persistence -> schemata [ $ k ] [ 'options' ] [ 'name' ] = sprintf ( 'modlr_%s' , md5 ( json_encode ( $ schema ) ) ) ; } }
Validates the schema definitions

@param   EntityMetadata  $metadata
@throws  MetadataException
Validates the schema definitions