ArrayNode
class ArrayNode extends BaseNode implements PrototypeNodeInterface
Represents an Array node in the config tree.
Constants
DEFAULT_PATH_SEPARATOR |
|
Properties
protected | $name | from BaseNode | |
protected | $parent | from BaseNode | |
protected | $normalizationClosures | from BaseNode | |
protected | $finalValidationClosures | from BaseNode | |
protected | $allowOverwrite | from BaseNode | |
protected | $required | from BaseNode | |
protected | $deprecationMessage | from BaseNode | |
protected | $equivalentValues | from BaseNode | |
protected | $attributes | from BaseNode | |
protected | $pathSeparator | from BaseNode | |
protected | $xmlRemappings | ||
protected | $children | ||
protected | $allowFalse | ||
protected | $allowNewKeys | ||
protected | $addIfNotSet | ||
protected | $performDeepMerging | ||
protected | $ignoreExtraKeys | ||
protected | $removeExtraKeys | ||
protected | $normalizeKeys |
Methods
No description
Register possible (dummy) values for a dynamic placeholder value.
Sets a common prefix for dynamic placeholder values.
Adds an equivalent value.
Sets the closures used for final validation.
Returns the deprecated message.
Normalizes keys between the different configuration formats.
Validates the type of the value.
Normalizes the value.
Merges values together.
Finalizes the value of this node.
Tests if placeholder values are allowed for this node.
No description
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 name of the node.
Returns true when the node has a default value.
Returns the default value of the node.
Remaps multiple singular values to a single plural value.
Details
__construct(string|null $name, NodeInterface $parent = null, string $pathSeparator = self::DEFAULT_PATH_SEPARATOR)
static void
setPlaceholder(string $placeholder, array $values)
Register possible (dummy) values for a dynamic placeholder value.
Matching configuration values will be processed with a provided value, one by one. After a provided value is successfully processed the configuration value is returned as is, thus preserving the placeholder.
static void
setPlaceholderUniquePrefix(string $prefix)
Sets a common prefix for dynamic placeholder values.
Matching configuration values will be skipped from being processed and are returned as is, thus preserving the placeholder. An exact match provided by {see setPlaceholder()} might take precedence.
setDeprecated(string|null $message)
Sets this node as deprecated.
You can use %node% and %path% placeholders in your message to display, respectively, the node name and its complete path.
protected The
preNormalize($value)
Normalizes keys between the different configuration formats.
Namely, you mostly have foo_bar in YAML while you have foo-bar in XML. After running this method, all keys are normalized to foo_bar.
If you have a mixed key like foo-bar_moo, it will not be altered. The key will also not be altered if the target key already exists.
setAddIfNotSet(bool $boolean)
Sets whether to add default values for this array if it has not been defined in any of the configuration files.
setAllowFalse(bool $allow)
Sets whether false is allowed as value indicating that the array should be unset.