NodeDefinition
abstract class NodeDefinition implements NodeParentInterface
This class provides a fluent interface for defining a node.
Properties
Methods
Sets info message.
Sets example configuration.
Sets an attribute on the node.
Returns the parent node.
Creates the node.
Sets the default value.
Sets the node as required.
Sets the node as deprecated.
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 null as the default value.
Sets true as the default value.
Sets false as the default value.
Sets an expression to run before the normalization.
Denies the node value being empty.
Sets an expression to run for the validation.
Sets whether the node can be overwritten.
Gets the builder for validation rules.
Gets the builder for merging rules.
Gets the builder for normalization rules.
Instantiate and configure the node according to this definition.
Set PathSeparator to use.
Details
NodeParentInterface|NodeBuilder|NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition|null
end()
Returns the parent node.
$this
setDeprecated(string $message = 'The child node "%node%" at path "%path%" is deprecated.')
Sets the node as deprecated.
You can use %node% and %path% placeholders in your message to display, respectively, the node name and its complete path.
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.
abstract protected NodeInterface
createNode()
Instantiate and configure the node according to this definition.