Symfony2 API
Class

Symfony\Component\Config\Definition\ScalarNode

class ScalarNode extends VariableNode

This node represents a scalar value in the config tree.

The following values are considered scalars:
* booleans
* strings
* null
* integers
* floats

Methods

setDefaultValue($value)

{@inheritDoc}

from VariableNode
Boolean hasDefaultValue()

Returns true when the node has a default value.

from VariableNode
mixed getDefaultValue()

Returns the default value of the node.

from VariableNode
setAllowEmptyValue(Boolean $boolean)

Sets if this node is allowed to have an empty value.

from VariableNode
setName(string $name)

Sets the name of the node.

from VariableNode

Details

in VariableNode at line 33
public setDefaultValue($value)

{@inheritDoc}

Parameters

$value

in VariableNode at line 42
public Boolean hasDefaultValue()

Returns true when the node has a default value.

Return Value

Boolean If the node has a default value

in VariableNode at line 50
public mixed getDefaultValue()

Returns the default value of the node.

Return Value

mixed The default value

Exceptions

RuntimeException if the node has no default value

in VariableNode at line 60
public setAllowEmptyValue(Boolean $boolean)

Sets if this node is allowed to have an empty value.

Parameters

Boolean $boolean True if this entity will accept empty values.

in VariableNode at line 68
public setName(string $name)

Sets the name of the node.

Parameters

string $name The name of the node