[ Index ]

PHP Cross Reference of phpBB-3.1.12-deutsch

title

Body

[close]

/vendor/symfony/config/Symfony/Component/Config/Definition/ -> PrototypedArrayNode.php (summary)

(no description)

File Size: 345 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

PrototypedArrayNode:: (14 methods):
  __construct()
  setMinNumberOfElements()
  setKeyAttribute()
  getKeyAttribute()
  setDefaultValue()
  hasDefaultValue()
  setAddChildrenIfNoneSet()
  getDefaultValue()
  setPrototype()
  getPrototype()
  addChild()
  finalizeValue()
  normalizeValue()
  mergeValues()


Class: PrototypedArrayNode  - X-Ref

Represents a prototyped Array node in the config tree.

__construct($name, NodeInterface $parent = null)   X-Ref
Constructor.

param: string        $name   The Node's name
param: NodeInterface $parent The node parent

setMinNumberOfElements($number)   X-Ref
Sets the minimum number of elements that a prototype based node must
contain. By default this is zero, meaning no elements.

param: int $number

setKeyAttribute($attribute, $remove = true)   X-Ref
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 still be present in the resulting
array, then you can set the second argument of this method to false.

param: string $attribute The name of the attribute which value is to be used as a key
param: bool   $remove    Whether or not to remove the key

getKeyAttribute()   X-Ref
Retrieves the name of the attribute which value should be used as key.

return: string The name of the attribute

setDefaultValue($value)   X-Ref
Sets the default value of this node.

param: string $value

hasDefaultValue()   X-Ref
Checks if the node has a default value.

return: bool

setAddChildrenIfNoneSet($children = array('defaults')   X-Ref
Adds default children when none are set.

param: int|string|array|null $children The number of children|The child name|The children names to be added

getDefaultValue()   X-Ref
Retrieves the default value.

The default value could be either explicited or derived from the prototype
default value.

return: array The default value

setPrototype(PrototypeNodeInterface $node)   X-Ref
Sets the node prototype.

param: PrototypeNodeInterface $node

getPrototype()   X-Ref
Retrieves the prototype.

return: PrototypeNodeInterface The prototype

addChild(NodeInterface $node)   X-Ref
Disable adding concrete children for prototyped nodes.

param: NodeInterface $node The child node to add

finalizeValue($value)   X-Ref
Finalizes the value of this node.

param: mixed $value
return: mixed The finalized value

normalizeValue($value)   X-Ref
Normalizes the value.

param: mixed $value The value to normalize
return: mixed The normalized value

mergeValues($leftSide, $rightSide)   X-Ref
Merges values together.

param: mixed $leftSide  The left side to merge.
param: mixed $rightSide The right side to merge.
return: mixed The merged values



Generated: Thu Jan 11 00:25:41 2018 Cross-referenced by PHPXref 0.7.1