IntegerNodeDefinition
class IntegerNodeDefinition extends NumericNodeDefinition
This class provides a fluent interface for defining an integer node.
Methods
Sets an attribute on the node.
Sets the equivalent value used when the node contains null.
Sets the equivalent value used when the node contains true.
Sets the equivalent value used when the node contains false.
Sets an expression to run before the normalization.
Sets whether the node can be overwritten.
Ensures that the value is smaller than the given reference.
Ensures that the value is bigger than the given reference.
Details
in NodeDefinition at line line 47
__construct(string $name, NodeParentInterface $parent = null)
Constructor
in NodeDefinition at line line 64
NodeDefinition
setParent(NodeParentInterface $parent)
Sets the parent node.
in NodeDefinition at line line 78
NodeDefinition
info(string $info)
Sets info message.
in NodeDefinition at line line 90
NodeDefinition
example(string|array $example)
Sets example configuration.
in NodeDefinition at line line 103
NodeDefinition
attribute(string $key, mixed $value)
Sets an attribute on the node.
in NodeDefinition at line line 115
NodeParentInterface
end()
Returns the parent node.
in NodeDefinition at line line 127
NodeInterface
getNode(Boolean $forceRootNode = false)
Creates the node.
in NodeDefinition at line line 154
NodeDefinition
defaultValue(mixed $value)
Sets the default value.
in NodeDefinition at line line 167
NodeDefinition
isRequired()
Sets the node as required.
in NodeDefinition at line line 181
NodeDefinition
treatNullLike(mixed $value)
Sets the equivalent value used when the node contains null.
in NodeDefinition at line line 195
NodeDefinition
treatTrueLike(mixed $value)
Sets the equivalent value used when the node contains true.
in NodeDefinition at line line 209
NodeDefinition
treatFalseLike(mixed $value)
Sets the equivalent value used when the node contains false.
in NodeDefinition at line line 221
NodeDefinition
defaultNull()
Sets null as the default value.
in NodeDefinition at line line 231
NodeDefinition
defaultTrue()
Sets true as the default value.
in NodeDefinition at line line 241
NodeDefinition
defaultFalse()
Sets false as the default value.
in NodeDefinition at line line 251
ExprBuilder
beforeNormalization()
Sets an expression to run before the normalization.
in NodeDefinition at line line 261
NodeDefinition
cannotBeEmpty()
Denies the node value being empty.
in NodeDefinition at line line 277
ExprBuilder
validate()
Sets an expression to run for the validation.
The expression receives the value of the node and must return it. It can modify it. An exception should be thrown when the node is not valid.
in NodeDefinition at line line 289
NodeDefinition
cannotBeOverwritten(Boolean $deny = true)
Sets whether the node can be overwritten.
in NumericNodeDefinition at line line 33
NumericNodeDefinition
max(mixed $max)
Ensures that the value is smaller than the given reference.
in NumericNodeDefinition at line line 52
NumericNodeDefinition
min(mixed $min)
Ensures that the value is bigger than the given reference.