Download the PHP package sauls/options-resolver without Composer
On this page you can find all versions of the php package sauls/options-resolver. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sauls/options-resolver
More information about sauls/options-resolver
Files in sauls/options-resolver
Package options-resolver
Short Description Symfony options resolver with multi dimensional array support
License MIT
Informations about the package options-resolver
Sauls OptionsResolver
Symfony OptionsResolver with multi dimensional array support
Requirements
PHP >= 7.2
Installation
Using composer
Apppend the composer.json file manually
Usage
Standard usage can be found at Symfony OptionsResolver official documentation.
The associative array support is added by using a dot notation
array indexes.
Defining options
To define the associative options, use dot notated
array indexes.
Adding allowed types
Allowed types are added using dot notation
index.
Adding allowed values
Allowed values are added using dot notation
index.
Default option values
Default options can be added as dot notation
index or associative array
.
Resolving options
Passing array to resolve options can contain either the dot notation
indexes or associative
array.
Exceptions
All exceptions will return what is wrong with your associative option using dot notation
. For example:
The option "nested.deep.type" with value "four" is invalid. Accepted values are: "one", "two", "three".
The option "nested.value" with value "wrong" is expected to be of type "int", but is of type "string".
The required option "nested.value" is missing.
The option "nested.deep.nmae" does not exist. Defined options are: "nested.deep.name", "nested.name", "nested.type", "nested.value", "text", "type".
All versions of options-resolver with dependencies
sauls/collections Version ^1.0
symfony/options-resolver Version ^4.0 || ^5.0