Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
This class provides a fluent interface for defining an array node.
- Author: Johannes M. Schmitt <schmittjoh@gmail.com>
Synopsis
class ArrayNodeDefinition
extends NodeDefinition
implements
ParentNodeDefinitionInterface
{
- // members
- protected $performDeepMerging;
- protected $ignoreExtraKeys;
- protected $children;
- protected $prototype;
- protected $atLeastOne;
- protected $allowNewKeys;
- protected $key;
- protected $removeKeyItem;
- protected $addDefaults;
- protected $addDefaultChildren;
- protected $nodeBuilder;
- protected $normalizeKeys;
- // Inherited members from NodeDefinition
- protected $name;
- protected $normalization;
- protected $validation;
- protected $defaultValue;
- protected $default;
- protected $required;
- protected $merge;
- protected $allowEmptyValue;
- protected $nullEquivalent;
- protected $trueEquivalent;
- protected $falseEquivalent;
- protected NodeParentInterface|NodeInterface $parent;
- protected array $attributes;
- // methods
- public void __construct()
- public void setBuilder()
- public NodeBuilder children()
- public NodeDefinition prototype()
- public ArrayNodeDefinition addDefaultsIfNotSet()
- public ArrayNodeDefinition addDefaultChildrenIfNoneSet()
- public ArrayNodeDefinition requiresAtLeastOneElement()
- public ArrayNodeDefinition disallowNewKeysInSubsequentConfigs()
- public ArrayNodeDefinition fixXmlConfig()
- public ArrayNodeDefinition useAttributeAsKey()
- public ArrayNodeDefinition canBeUnset()
- public ArrayNodeDefinition canBeEnabled()
- public ArrayNodeDefinition canBeDisabled()
- public ArrayNodeDefinition performNoDeepMerging()
- public ArrayNodeDefinition ignoreExtraKeys()
- public ArrayNodeDefinition normalizeKeys()
- public ArrayNodeDefinition append()
- protected NodeBuilder getNodeBuilder()
- protected void createNode()
- protected void validateConcreteNode()
- protected void validatePrototypeNode()
- // Inherited methods from NodeDefinition
- public void __construct()
- public NodeDefinition setParent()
- public NodeDefinition info()
- public NodeDefinition example()
- public NodeDefinition attribute()
- public NodeParentInterface end()
- public NodeInterface getNode()
- public NodeDefinition defaultValue()
- public NodeDefinition isRequired()
- public NodeDefinition treatNullLike()
- public NodeDefinition treatTrueLike()
- public NodeDefinition treatFalseLike()
- public NodeDefinition defaultNull()
- public NodeDefinition defaultTrue()
- public NodeDefinition defaultFalse()
- public ExprBuilder beforeNormalization()
- public NodeDefinition cannotBeEmpty()
- public ExprBuilder validate()
- public NodeDefinition cannotBeOverwritten()
- protected ValidationBuilder validation()
- protected MergeBuilder merge()
- protected NormalizationBuilder normalization()
- protected abstract NodeInterface createNode()
Hierarchy
Extends
Implements
Members
protected
- $addDefaultChildren
- $addDefaults
- $allowEmptyValue
- $allowNewKeys
- $atLeastOne
- $attributes
- $children
- $default
- $defaultValue
- $falseEquivalent
- $ignoreExtraKeys
- $key
- $merge
- $name
- $nodeBuilder
- $normalization
- $normalizeKeys
- $nullEquivalent
- $parent — Symfony\Component\Config\Definition\Builder\NodeParentInterface|NodeInterface
- $performDeepMerging
- $prototype
- $removeKeyItem
- $required
- $trueEquivalent
- $validation
Methods
protected
- createNode() — {@inheritDoc}
- getNodeBuilder() — Returns a node builder to be used to add children and prototype
- validateConcreteNode() — Validate the configuration of a concrete node.
- validatePrototypeNode() — Validate the configuration of a prototype node.
public
- __construct() — {@inheritDoc}
- addDefaultChildrenIfNoneSet() — Adds children with a default value when none are defined.
- addDefaultsIfNotSet() — Adds the default value if the node is not set in the configuration.
- append() — Appends a node definition.
- canBeDisabled() — Adds an "enabled" boolean to enable the current section.
- canBeEnabled() — Adds an "enabled" boolean to enable the current section.
- canBeUnset() — Sets whether the node can be unset.
- children() — Returns a builder to add children nodes.
- disallowNewKeysInSubsequentConfigs() — Disallows adding news keys in a subsequent configuration.
- fixXmlConfig() — Sets a normalization rule for XML configurations.
- ignoreExtraKeys() — Allows extra config keys to be specified under an array without throwing an exception.
- normalizeKeys() — Sets key normalization.
- performNoDeepMerging() — Disables the deep merging of the node.
- prototype() — Sets a prototype for child nodes.
- requiresAtLeastOneElement() — Requires the node to have at least one element.
- setBuilder() — Sets a custom children builder.
- useAttributeAsKey() — Sets the attribute which value is to be used as key.
Inherited from Symfony\Component\Config\Definition\Builder\NodeDefinition
protected
- createNode() — Instantiate and configure the node according to this definition
- merge() — Gets the builder for merging rules.
- normalization() — Gets the builder for normalization rules.
- validation() — Gets the builder for validation rules.
public
- attribute() — Sets an attribute on the node.
- beforeNormalization() — Sets an expression to run before the normalization.
- cannotBeEmpty() — Denies the node value being empty.
- cannotBeOverwritten() — Sets whether the node can be overwritten.
- defaultFalse() — Sets false as the default value.
- defaultNull() — Sets null as the default value.
- defaultTrue() — Sets true as the default value.
- defaultValue() — Sets the default value.
- end() — Returns the parent node.
- example() — Sets example configuration.
- getNode() — Creates the node.
- info() — Sets info message.
- isRequired() — Sets the node as required.
- setParent() — Sets the parent node.
- treatFalseLike() — Sets the equivalent value used when the node contains false.
- treatNullLike() — Sets the equivalent value used when the node contains null.
- treatTrueLike() — Sets the equivalent value used when the node contains true.
- validate() — Sets an expression to run for the validation.