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(Boolean $boolean)
Set this node as required. |
||
|
setAllowOverwrite(Boolean $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. |
||
| Boolean |
isRequired()
Returns true when the node is required. |
|
| string |
getName()
Returns the name of the node. |
|
| string |
getPath()
Returns the path of the node. |
|
| mixed |
merge(mixed $leftSide, mixed $rightSide)
Merges two values together. |
|
| mixed |
normalize(mixed $value)
Normalizes the supplied value. |
|
| mixed |
finalize(mixed $value)
Finalizes a value. |
Details
at line 42
public
__construct(string $name, NodeInterface $parent = null)
Constructor.
at line 57
public
setAttribute($key, $value)
at line 62
public
getAttribute($key, $default = null)
at line 67
public
hasAttribute($key)
at line 72
public
getAttributes()
at line 77
public
setAttributes(array $attributes)
at line 82
public
removeAttribute($key)
at line 92
public
setInfo(string $info)
Sets an info message.
at line 102
public string
getInfo()
Returns info message.
at line 112
public
setExample(string|array $example)
Sets the example configuration for this node.
at line 122
public string|array
getExample()
Retrieves the example configuration for this node.
at line 133
public
addEquivalentValue(mixed $originalValue, mixed $equivalentValue)
Adds an equivalent value.
at line 143
public
setRequired(Boolean $boolean)
Set this node as required.
at line 153
public
setAllowOverwrite(Boolean $allow)
Sets if this node can be overridden.
at line 163
public
setNormalizationClosures(array $closures)
Sets the closures used for normalization.
at line 173
public
setFinalValidationClosures(array $closures)
Sets the closures used for final validation.
at line 183
public Boolean
isRequired()
Returns true when the node is required.
at line 193
public string
getName()
Returns the name of the node.
at line 203
public string
getPath()
Returns the path of the node.
at line 224
final public mixed
merge(mixed $leftSide, mixed $rightSide)
Merges two values together.
at line 248
final public mixed
normalize(mixed $value)
Normalizes the supplied value.
at line 292
final public mixed
finalize(mixed $value)
Finalizes a value.