PrototypedArrayNode::setAddChildrenIfNoneSet()

setAddChildrenIfNoneSet(int|string|array|null $children = array('defaults')) Adds default children when none are set. Parameters int|string|array|null $children The number of children|The child name|The children names to be added

PrototypedArrayNode::setPrototype()

setPrototype(PrototypeNodeInterface $node) Sets the node prototype. Parameters PrototypeNodeInterface $node

PrototypedArrayNode::setKeyAttribute()

setKeyAttribute(string $attribute, bool $remove = true) Sets the attribute which value is to be used as key. This is useful when you have an indexed array that should be an associative array. You can select an item from within the array to be the key of the particular item. For example, if "id" is the "key", then: array( array('id' => 'my_name', 'foo' => 'bar'), ); becomes array( 'my_name' => array('foo' => 'bar'), ); If you'd like "'id' => 'my_name'" to s

PrototypedArrayNode::setDefaultValue()

setDefaultValue(string $value) Sets the default value of this node. Parameters string $value Exceptions InvalidArgumentException if the default value is not an array

PrototypedArrayNode::addChild()

addChild(NodeInterface $node) Disable adding concrete children for prototyped nodes. Parameters NodeInterface $node The child node to add Exceptions Exception

PrototypedArrayNode::getKeyAttribute()

string getKeyAttribute() Retrieves the name of the attribute which value should be used as key. Return Value string The name of the attribute

PrototypedArrayNode::hasDefaultValue()

bool hasDefaultValue() Checks if the node has a default value. Return Value bool If the node has a default value

PrototypedArrayNode::getPrototype()

PrototypeNodeInterface getPrototype() Retrieves the prototype. Return Value PrototypeNodeInterface The prototype

PrototypedArrayNode::getDefaultValue()

mixed getDefaultValue() Retrieves the default value. The default value could be either explicited or derived from the prototype default value. Return Value mixed The default value

PrototypedArrayNode

class PrototypedArrayNode extends ArrayNode Represents a prototyped Array node in the config tree. Methods __construct(string $name, NodeInterface $parent = null) Constructor. from BaseNode setAttribute($key, $value) from BaseNode getAttribute($key, $default = null) from BaseNode hasAttribute($key) from BaseNode getAttributes() from BaseNode setAttributes(array $attributes) from BaseNode removeAttribute($key) from BaseNode setInfo(string $info) Sets an i