class IntegerNode extends NumericNode
This node represents an integer value in the config tree.
__construct(string $name, NodeInterface $parent = null, $min = null, $max = null) Constructor. | from NumericNode | |
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 |
setDefaultValue($value) {@inheritdoc} | from VariableNode | |
bool | hasDefaultValue() Returns true when the node has a default value. | from VariableNode |
mixed | getDefaultValue() Returns the default value of the node. | from VariableNode |
setAllowEmptyValue(bool $boolean) Sets if this node is allowed to have an empty value. | from VariableNode | |
setName(string $name) Sets the name of the node. | from VariableNode |
Constructor.
string | $name | The name of the node |
NodeInterface | $parent | The parent of this node |
$min | ||
$max |
InvalidArgumentException | if the name contains a period. |
$key | ||
$value |
$key | ||
$default |
$key |
array | $attributes |
$key |
Sets an info message.
string | $info |
Returns info message.
string | The info text |
Sets the example configuration for this node.
string|array | $example |
Retrieves the example configuration for this node.
string|array | The example |
Adds an equivalent value.
mixed | $originalValue | |
mixed | $equivalentValue |
Set this node as required.
bool | $boolean | Required node |
Sets if this node can be overridden.
bool | $allow |
Sets the closures used for normalization.
array | $closures | An array of Closures used for normalization |
Sets the closures used for final validation.
array | $closures | An array of Closures used for final validation |
Checks if this node is required.
bool | If the node is required |
Returns the name of this node
string | The name of the node |
Retrieves the path of this node.
string | The node path |
Merges two values together.
mixed | $leftSide | |
mixed | $rightSide |
mixed | The merged values |
ForbiddenOverwriteException |
Normalizes a value, applying all normalization closures.
mixed | $value | The value to normalize |
mixed | The normalized value |
Returns parent node for this node.
NodeInterface|null |
Finalizes a value, applying all finalization closures.
mixed | $value | The value to finalize |
mixed | The finalized value |
Exception | |
InvalidConfigurationException |
{@inheritdoc}
$value |
Returns true when the node has a default value.
bool | If the node has a default value |
Returns the default value of the node.
mixed | The default value |
RuntimeException | if the node has no default value |
Sets if this node is allowed to have an empty value.
bool | $boolean | True if this entity will accept empty values. |
Sets the name of the node.
string | $name | The name of the node |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Config/Definition/IntegerNode.html