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