| Methods |
public
|
__construct(?string $name, NodeParentInterface $parent = null)
|
#
|
public
|
setParent(NodeParentInterface $parent): $this
Sets the parent node.
|
#
|
public
|
info(string $info): $this
Sets info message.
|
#
|
public
|
example(string|array $example): $this
Sets example configuration.
Sets example configuration.
|
#
|
public
|
attribute(string $key, mixed $value): $this
Sets an attribute on the node.
Sets an attribute on the node.
|
#
|
public
|
end(): NodeParentInterface|NodeBuilder|NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition|null
Returns the parent node.
|
#
|
public
|
getNode(bool $forceRootNode = false): NodeInterface
Creates the node.
|
#
|
public
|
defaultValue(mixed $value): $this
Sets the default value.
|
#
|
public
|
isRequired(): $this
Sets the node as required.
Sets the node as required.
|
#
|
public
|
setDeprecated(
string $package,
string $version,
string $message = 'The child node "%node%" at path "%path%" is deprecated.',
): $this
Sets the node as deprecated.
Sets the node as deprecated.
Parameters
| $package |
The name of the composer package that is triggering the deprecation
|
| $version |
The version of the package that introduced the deprecation
|
| $message |
the deprecation message to use
|
|
#
|
public
|
treatNullLike(mixed $value): $this
Sets the equivalent value used when the node contains null.
Sets the equivalent value used when the node contains null.
|
#
|
public
|
treatTrueLike(mixed $value): $this
Sets the equivalent value used when the node contains true.
Sets the equivalent value used when the node contains true.
|
#
|
public
|
treatFalseLike(mixed $value): $this
Sets the equivalent value used when the node contains false.
Sets the equivalent value used when the node contains false.
|
#
|
public
|
defaultNull(): $this
Sets null as the default value.
Sets null as the default value.
|
#
|
public
|
defaultTrue(): $this
Sets true as the default value.
Sets true as the default value.
|
#
|
public
|
defaultFalse(): $this
Sets false as the default value.
Sets false as the default value.
|
#
|
public
|
beforeNormalization(): ExprBuilder
Sets an expression to run before the normalization.
Sets an expression to run before the normalization.
|
#
|
public
|
cannotBeEmpty(): $this
Denies the node value being empty.
Denies the node value being empty.
Overriden by
|
#
|
public
|
validate(): ExprBuilder
Sets an expression to run for the validation.
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.
|
#
|
public
|
cannotBeOverwritten(bool $deny = true): $this
Sets whether the node can be overwritten.
Sets whether the node can be overwritten.
|
#
|
protected
|
validation(): ValidationBuilder
Gets the builder for validation rules.
Gets the builder for validation rules.
|
#
|
protected
|
merge(): MergeBuilder
Gets the builder for merging rules.
Gets the builder for merging rules.
|
#
|
protected
|
normalization(): NormalizationBuilder
Gets the builder for normalization rules.
Gets the builder for normalization rules.
|
#
|
abstract
protected
|
createNode(): NodeInterface
Instantiate and configure the node according to this definition.
Instantiate and configure the node according to this definition.
Throws
Implemented by
|
#
|
public
|
setPathSeparator(string $separator): $this
Set PathSeparator to use.
Set PathSeparator to use.
|
#
|