SchemaGenerator
class SchemaGenerator (View source)
Configuration schema generator.
The implementation is still simple and intends to be a kickstart for writing schemas. In future this can be extended.
See \Neos\Utility\SchemaValidator for a description of all features of the SchemaValidator
Methods
Generate a schema for the given value
Create a schema for a dictionary
Create a schema for an array structure
Create a schema for a given string
Compact an array of items to avoid adding the same value more than once.
Details
array
generate(mixed $value)
Generate a schema for the given value
protected array
generateDictionarySchema(array $dictionaryValue)
Create a schema for a dictionary
protected array
generateArraySchema(array $arrayValue)
Create a schema for an array structure
protected array
generateStringSchema(string $stringValue)
Create a schema for a given string
protected mixed
filterDuplicatesFromArray(array $values)
Compact an array of items to avoid adding the same value more than once.
If the result contains only one item, that item is returned directly.