Symfony\Component\OptionsResolver\OptionsResolver
Helper for merging default and concrete option values.
- Author: Bernhard Schussek <bschussek@gmail.com>
Synopsis
class OptionsResolver
implements
OptionsResolverInterface
{
- // members
- private Options $defaultOptions;
- private array $knownOptions;
- private array $requiredOptions;
- private array $allowedValues;
- private array $allowedTypes;
- // methods
- public void __construct()
- public void __clone()
- public void setDefaults()
- public void replaceDefaults()
- public void setOptional()
- public void setRequired()
- public void setAllowedValues()
- public void addAllowedValues()
- public void setAllowedTypes()
- public void addAllowedTypes()
- public void setNormalizers()
- public void isKnown()
- public void isRequired()
- public void resolve()
- private void validateOptionsExistence()
- private void validateOptionsCompleteness()
- private void validateOptionValues()
- private void validateOptionTypes()
Hierarchy
Members
private
- $allowedTypes
—
array
A list of accepted types for each option. - $allowedValues
—
array
A list of accepted values for each option. - $defaultOptions
—
Symfony\Component\OptionsResolver\Options
The default option values. - $knownOptions
—
array
The options known by the resolver. - $requiredOptions
—
array
The options without defaults that are required to be passed to resolve().
Methods
private
- validateOptionTypes() — Validates that the given options match the allowed types and throws an exception otherwise.
- validateOptionValues() — Validates that the given option values match the allowed values and throws an exception otherwise.
- validateOptionsCompleteness() — Validates that all required options are given and throws an exception otherwise.
- validateOptionsExistence() — Validates that the given option names exist and throws an exception otherwise.
public
- __construct() — Creates a new instance.
- __clone() — Clones the resolver.
- addAllowedTypes() — {@inheritdoc}
- addAllowedValues() — {@inheritdoc}
- isKnown() — {@inheritdoc}
- isRequired() — {@inheritdoc}
- replaceDefaults() — {@inheritdoc}
- resolve() — {@inheritdoc}
- setAllowedTypes() — {@inheritdoc}
- setAllowedValues() — {@inheritdoc}
- setDefaults() — {@inheritdoc}
- setNormalizers() — {@inheritdoc}
- setOptional() — {@inheritdoc}
- setRequired() — {@inheritdoc}