ScalarNode
class ScalarNode extends VariableNode
This node represents a scalar value in the config tree.
The following values are considered scalars: * booleans * strings * null * integers * floats
Methods
Adds an equivalent value.
Sets the closures used for final validation.
Normalizes a value, applying all normalization closures.
Sets if this node is allowed to have an empty value.
Details
in BaseNode at line line 43
__construct(string $name, NodeInterface $parent = null)
Constructor.
in BaseNode at line line 53
setAttribute($key, $value)
in BaseNode at line line 58
getAttribute($key, $default = null)
in BaseNode at line line 63
hasAttribute($key)
in BaseNode at line line 68
getAttributes()
in BaseNode at line line 73
setAttributes(array $attributes)
in BaseNode at line line 78
removeAttribute($key)
in BaseNode at line line 88
setInfo(string $info)
Sets an info message.
in BaseNode at line line 98
string
getInfo()
Returns info message.
in BaseNode at line line 108
setExample(string|array $example)
Sets the example configuration for this node.
in BaseNode at line line 118
string|array
getExample()
Retrieves the example configuration for this node.
in BaseNode at line line 129
addEquivalentValue(mixed $originalValue, mixed $equivalentValue)
Adds an equivalent value.
in BaseNode at line line 139
setRequired(bool $boolean)
Set this node as required.
in BaseNode at line line 149
setAllowOverwrite(bool $allow)
Sets if this node can be overridden.
in BaseNode at line line 159
setNormalizationClosures(array $closures)
Sets the closures used for normalization.
in BaseNode at line line 169
setFinalValidationClosures(array $closures)
Sets the closures used for final validation.
in BaseNode at line line 179
bool
isRequired()
Checks if this node is required.
in BaseNode at line line 189
string
getName()
Returns the name of this node.
in BaseNode at line line 199
string
getPath()
Retrieves the path of this node.
in BaseNode at line line 220
final mixed
merge(mixed $leftSide, mixed $rightSide)
Merges two values together.
in BaseNode at line line 244
final mixed
normalize(mixed $value)
Normalizes a value, applying all normalization closures.
in BaseNode at line line 284
NodeInterface|null
getParent()
Returns parent node for this node.
in BaseNode at line line 299
final mixed
finalize(mixed $value)
Finalizes a value, applying all finalization closures.
in VariableNode at line line 33
setDefaultValue($value)
{@inheritdoc}
in VariableNode at line line 42
bool
hasDefaultValue()
Returns true when the node has a default value.
in VariableNode at line line 50
mixed
getDefaultValue()
Returns the default value of the node.
in VariableNode at line line 62
setAllowEmptyValue(bool $boolean)
Sets if this node is allowed to have an empty value.
in VariableNode at line line 70
setName(string $name)
Sets the name of the node.