interface NodeInterface

Common Interface among all nodes.

In most cases, it is better to inherit from BaseNode instead of implementing this interface yourself.

Methods

string
getName()

Returns the name of the node.

string
getPath()

Returns the path of the node.

bool
isRequired()

Returns true when the node is required.

bool
hasDefaultValue()

Returns true when the node has a default value.

mixed
getDefaultValue()

Returns the default value of the node.

mixed
normalize(mixed $value)

Normalizes a value.

mixed
merge(mixed $leftSide, mixed $rightSide)

Merges two values together.

mixed
finalize(mixed $value)

Finalizes a value.

Details

at line line 33
string getName()

Returns the name of the node.

Return Value

string The name of the node

at line line 40
string getPath()

Returns the path of the node.

Return Value

string The node path

at line line 47
bool isRequired()

Returns true when the node is required.

Return Value

bool If the node is required

at line line 54
bool hasDefaultValue()

Returns true when the node has a default value.

Return Value

bool If the node has a default value

at line line 63
mixed getDefaultValue()

Returns the default value of the node.

Return Value

mixed The default value

Exceptions

RuntimeException if the node has no default value

at line line 74
mixed normalize(mixed $value)

Normalizes a value.

Parameters

mixed $value The value to normalize

Return Value

mixed The normalized value

Exceptions

InvalidTypeException if the value type is invalid

at line line 87
mixed merge(mixed $leftSide, mixed $rightSide)

Merges two values together.

Parameters

mixed $leftSide
mixed $rightSide

Return Value

mixed The merged value

Exceptions

ForbiddenOverwriteException if the configuration path cannot be overwritten
InvalidTypeException if the value type is invalid

at line line 99
mixed finalize(mixed $value)

Finalizes a value.

Parameters

mixed $value The value to finalize

Return Value

mixed The finalized value

Exceptions

InvalidTypeException if the value type is invalid
InvalidConfigurationException if the value is invalid configuration