class PrototypedArrayNode extends ArrayNode
Represents a prototyped Array node in the config tree.
__construct(string $name, NodeInterface $parent = null) Constructor. | from BaseNode | |
setAttribute($key, $value) | from BaseNode | |
getAttribute($key, $default = null) | from BaseNode | |
hasAttribute($key) | from BaseNode | |
getAttributes() | from BaseNode | |
setAttributes(array $attributes) | from BaseNode | |
removeAttribute($key) | from BaseNode | |
setInfo(string $info) Sets an info message. | from BaseNode | |
string | getInfo() Returns info message. | from BaseNode |
setExample(string|array $example) Sets the example configuration for this node. | from BaseNode | |
string|array | getExample() Retrieves the example configuration for this node. | from BaseNode |
addEquivalentValue(mixed $originalValue, mixed $equivalentValue) Adds an equivalent value. | from BaseNode | |
setRequired(bool $boolean) Set this node as required. | from BaseNode | |
setAllowOverwrite(bool $allow) Sets if this node can be overridden. | from BaseNode | |
setNormalizationClosures(array $closures) Sets the closures used for normalization. | from BaseNode | |
setFinalValidationClosures(array $closures) Sets the closures used for final validation. | from BaseNode | |
bool | isRequired() Checks if this node is required. | from BaseNode |
string | getName() Returns the name of this node. | from BaseNode |
string | getPath() Retrieves the path of this node. | from BaseNode |
mixed | merge(mixed $leftSide, mixed $rightSide) Merges two values together. | from BaseNode |
mixed | normalize(mixed $value) Normalizes a value, applying all normalization closures. | from BaseNode |
NodeInterface|null | getParent() Returns parent node for this node. | from BaseNode |
mixed | finalize(mixed $value) Finalizes a value, applying all finalization closures. | from BaseNode |
setNormalizeKeys($normalizeKeys) | from ArrayNode | |
array | getChildren() Retrieves the children of this node. | from ArrayNode |
setXmlRemappings(array $remappings) Sets the xml remappings that should be performed. | from ArrayNode | |
array | getXmlRemappings() Gets the xml remappings that should be performed. | from ArrayNode |
setAddIfNotSet(bool $boolean) Sets whether to add default values for this array if it has not been defined in any of the configuration files. | from ArrayNode | |
setAllowFalse(bool $allow) Sets whether false is allowed as value indicating that the array should be unset. | from ArrayNode | |
setAllowNewKeys(bool $allow) Sets whether new keys can be defined in subsequent configurations. | from ArrayNode | |
setPerformDeepMerging(bool $boolean) Sets if deep merging should occur. | from ArrayNode | |
setIgnoreExtraKeys(bool $boolean, bool $remove = true) Whether extra keys should just be ignore without an exception. | from ArrayNode | |
setName(string $name) Sets the node Name. | from ArrayNode | |
bool | hasDefaultValue() Checks if the node has a default value. | |
mixed | getDefaultValue() Retrieves the default value. | |
addChild(NodeInterface $node) Disable adding concrete children for prototyped nodes. | ||
setMinNumberOfElements(int $number) Sets the minimum number of elements that a prototype based node must contain. By default this is zero, meaning no elements. | ||
setKeyAttribute(string $attribute, bool $remove = true) Sets the attribute which value is to be used as key. | ||
string | getKeyAttribute() Retrieves the name of the attribute which value should be used as key. | |
setDefaultValue(string $value) Sets the default value of this node. | ||
setAddChildrenIfNoneSet(int|string|array|null $children = array('defaults')) Adds default children when none are set. | ||
setPrototype(PrototypeNodeInterface $node) Sets the node prototype. | ||
PrototypeNodeInterface | getPrototype() Retrieves the prototype. |
Constructor.
Sets an info message.
Returns info message.
Sets the example configuration for this node.
Retrieves the example configuration for this node.
Adds an equivalent value.
Set this node as required.
Sets if this node can be overridden.
Sets the closures used for normalization.
Sets the closures used for final validation.
Checks if this node is required.
Returns the name of this node.
Retrieves the path of this node.
Merges two values together.
Normalizes a value, applying all normalization closures.
Returns parent node for this node.
Finalizes a value, applying all finalization closures.
Retrieves the children of this node.
Sets the xml remappings that should be performed.
Gets the xml remappings that should be performed.
Sets whether to add default values for this array if it has not been defined in any of the configuration files.
Sets whether false is allowed as value indicating that the array should be unset.
Sets whether new keys can be defined in subsequent configurations.
Sets if deep merging should occur.
Whether extra keys should just be ignore without an exception.
Sets the node Name.
Checks if the node has a default value.
Retrieves the default value.
The default value could be either explicited or derived from the prototype default value.
Disable adding concrete children for prototyped nodes.
Sets the minimum number of elements that a prototype based node must contain. By default this is zero, meaning no elements.
Sets the attribute which value is to be used as key.
This is useful when you have an indexed array that should be an associative array. You can select an item from within the array to be the key of the particular item. For example, if "id" is the "key", then:
array(
array('id' => 'my_name', 'foo' => 'bar'),
);
becomes
array(
'my_name' => array('foo' => 'bar'),
);
If you'd like "'id' => 'my_name'" to still be present in the resulting array, then you can set the second argument of this method to false.
Retrieves the name of the attribute which value should be used as key.
Sets the default value of this node.
Adds default children when none are set.
Sets the node prototype.
Retrieves the prototype.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.1/Symfony/Component/Config/Definition/PrototypedArrayNode.html