class BaseNode implements NodeInterface
The base node class.
__construct(string $name, NodeInterface $parent = null) | ||
setAttribute($key, $value) | ||
getAttribute($key, $default = null) | ||
hasAttribute($key) | ||
getAttributes() | ||
setAttributes(array $attributes) | ||
removeAttribute($key) | ||
setInfo(string $info) Sets an info message. | ||
string | getInfo() Returns info message. | |
setExample(string|array $example) Sets the example configuration for this node. | ||
string|array | getExample() Retrieves the example configuration for this node. | |
addEquivalentValue(mixed $originalValue, mixed $equivalentValue) Adds an equivalent value. | ||
setRequired(bool $boolean) Set this node as required. | ||
setDeprecated(string|null $message) Sets this node as deprecated. | ||
setAllowOverwrite(bool $allow) Sets if this node can be overridden. | ||
setNormalizationClosures(array $closures) Sets the closures used for normalization. | ||
setFinalValidationClosures(array $closures) Sets the closures used for final validation. | ||
bool | isRequired() Checks if this node is required. | |
bool | isDeprecated() Checks if this node is deprecated. | |
string | getDeprecationMessage(string $node, string $path) Returns the deprecated message. | |
string | getName() Returns the name of this node. | |
string | getPath() Retrieves the path of this node. | |
mixed | merge(mixed $leftSide, mixed $rightSide) Merges two values together. | |
mixed | normalize(mixed $value) Normalizes a value, applying all normalization closures. | |
NodeInterface|null | getParent() Returns parent node for this node. | |
mixed | finalize(mixed $value) Finalizes a value, applying all finalization closures. |
string | $name | The name of the node |
NodeInterface | $parent | The parent of this node |
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 this node as deprecated.
You can use %node% and %path% placeholders in your message to display, respectively, the node name and its complete path.
string|null | $message | Deprecated message |
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 |
Checks if this node is deprecated.
bool |
Returns the deprecated message.
string | $node | the configuration node name |
string | $path | the path of the node |
string |
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 |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Config/Definition/BaseNode.html