class IntegerNodeDefinition extends NumericNodeDefinition
This class provides a fluent interface for defining an integer node.
Methods
__construct(string $name, NodeParentInterface $parent = null) Constructor | from NodeDefinition | |
NodeDefinition | setParent(NodeParentInterface $parent) Sets the parent node. | from NodeDefinition |
NodeDefinition | info(string $info) Sets info message. | from NodeDefinition |
NodeDefinition | example(string|array $example) Sets example configuration. | from NodeDefinition |
NodeDefinition | attribute(string $key, mixed $value) Sets an attribute on the node. | from NodeDefinition |
NodeParentInterface | end() Returns the parent node. | from NodeDefinition |
NodeInterface | getNode(Boolean $forceRootNode = false) Creates the node. | from NodeDefinition |
NodeDefinition | defaultValue(mixed $value) Sets the default value. | from NodeDefinition |
NodeDefinition | isRequired() Sets the node as required. | from NodeDefinition |
NodeDefinition | treatNullLike(mixed $value) Sets the equivalent value used when the node contains null. | from NodeDefinition |
NodeDefinition | treatTrueLike(mixed $value) Sets the equivalent value used when the node contains true. | from NodeDefinition |
NodeDefinition | treatFalseLike(mixed $value) Sets the equivalent value used when the node contains false. | from NodeDefinition |
NodeDefinition | defaultNull() Sets null as the default value. | from NodeDefinition |
NodeDefinition | defaultTrue() Sets true as the default value. | from NodeDefinition |
NodeDefinition | defaultFalse() Sets false as the default value. | from NodeDefinition |
ExprBuilder | beforeNormalization() Sets an expression to run before the normalization. | from NodeDefinition |
NodeDefinition | cannotBeEmpty() Denies the node value being empty. | from NodeDefinition |
ExprBuilder | validate() Sets an expression to run for the validation. | from NodeDefinition |
NodeDefinition | cannotBeOverwritten(Boolean $deny = true) Sets whether the node can be overwritten. | from NodeDefinition |
NumericNodeDefinition | max(mixed $max) Ensures that the value is smaller than the given reference. | from NumericNodeDefinition |
NumericNodeDefinition | min(mixed $min) Ensures that the value is bigger than the given reference. | from NumericNodeDefinition |
Details
__construct(string $name, NodeParentInterface $parent = null)
Constructor
NodeDefinition setParent(NodeParentInterface $parent)
Sets the parent node.
NodeDefinition info(string $info)
Sets info message.
NodeDefinition example(string|array $example)
Sets example configuration.
NodeDefinition attribute(string $key, mixed $value)
Sets an attribute on the node.
NodeParentInterface end()
Returns the parent node.
NodeInterface getNode(Boolean $forceRootNode = false)
Creates the node.
NodeDefinition defaultValue(mixed $value)
Sets the default value.
NodeDefinition isRequired()
Sets the node as required.
NodeDefinition treatNullLike(mixed $value)
Sets the equivalent value used when the node contains null.
NodeDefinition treatTrueLike(mixed $value)
Sets the equivalent value used when the node contains true.
NodeDefinition treatFalseLike(mixed $value)
Sets the equivalent value used when the node contains false.
NodeDefinition defaultNull()
Sets null as the default value.
NodeDefinition defaultTrue()
Sets true as the default value.
NodeDefinition defaultFalse()
Sets false as the default value.
ExprBuilder beforeNormalization()
Sets an expression to run before the normalization.
NodeDefinition cannotBeEmpty()
Denies the node value being empty.
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.
NodeDefinition cannotBeOverwritten(Boolean $deny = true)
Sets whether the node can be overwritten.
NumericNodeDefinition max(mixed $max)
Ensures that the value is smaller than the given reference.
NumericNodeDefinition min(mixed $min)
Ensures that the value is bigger than the given reference.
Please login to continue.