Overview

Namespaces

  • Contrib
    • Bundle
      • CoverallsBundle
        • Console
        • Entity
      • CoverallsV1Bundle
        • Api
        • Collector
        • Command
        • Config
        • Entity
          • Git
    • Component
      • File
      • Log
      • System
        • Git
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Config
        • Definition
          • Builder
          • Exception
        • Exception
        • Loader
        • Resource
        • Util
      • Console
        • Command
        • Formatter
        • Helper
        • Input
        • Output
        • Tester
      • EventDispatcher
        • Debug
      • Finder
        • Adapter
        • Comparator
        • Exception
        • Expression
        • Iterator
        • Shell
      • Stopwatch
      • Yaml
        • Exception

Classes

  • ArrayNode
  • BaseNode
  • BooleanNode
  • EnumNode
  • FloatNode
  • IntegerNode
  • NumericNode
  • Processor
  • PrototypedArrayNode
  • ReferenceDumper
  • ScalarNode
  • VariableNode

Interfaces

  • ConfigurationInterface
  • NodeInterface
  • PrototypeNodeInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class PrototypedArrayNode

Represents a prototyped Array node in the config tree.

Symfony\Component\Config\Definition\BaseNode implements Symfony\Component\Config\Definition\NodeInterface
Extended by Symfony\Component\Config\Definition\ArrayNode implements Symfony\Component\Config\Definition\PrototypeNodeInterface
Extended by Symfony\Component\Config\Definition\PrototypedArrayNode
Namespace: Symfony\Component\Config\Definition
Author: Johannes M. Schmitt <schmittjoh@gmail.com>
Located at config/Symfony/Component/Config/Definition/PrototypedArrayNode.php
Methods summary
public
# __construct( string $name, Symfony\Component\Config\Definition\NodeInterface $parent = null )

Constructor.

Constructor.

Parameters

$name
string
$name The Node's name
$parent
Symfony\Component\Config\Definition\NodeInterface
$parent The node parent

Throws

InvalidArgumentException
if the name contains a period.

Overrides

Symfony\Component\Config\Definition\ArrayNode::__construct()
public
# setMinNumberOfElements( integer $number )

Sets the minimum number of elements that a prototype based node must contain. By default this is zero, meaning no elements.

Sets the minimum number of elements that a prototype based node must contain. By default this is zero, meaning no elements.

Parameters

$number
integer
$number
public
# setKeyAttribute( string $attribute, Boolean $remove = true )

Sets the attribute which value is to be used as key.

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.

Parameters

$attribute
string
$attribute The name of the attribute which value is to be used as a key
$remove
Boolean
$remove Whether or not to remove the key
public string
# getKeyAttribute( )

Retrieves the name of the attribute which value should be used as key.

Retrieves the name of the attribute which value should be used as key.

Returns

string
The name of the attribute
public
# setDefaultValue( string $value )

Sets the default value of this node.

Sets the default value of this node.

Parameters

$value
string
$value

Throws

InvalidArgumentException
if the default value is not an array
public Boolean
# hasDefaultValue( )

Checks if the node has a default value.

Checks if the node has a default value.

Returns

Boolean

Overrides

Symfony\Component\Config\Definition\ArrayNode::hasDefaultValue()
public
# setAddChildrenIfNoneSet( integer|string|array|null $children = array('defaults') )

Adds default children when none are set.

Adds default children when none are set.

Parameters

$children
integer|string|array|null
$children The number of children|The child name|The children names to be added
public array
# getDefaultValue( )

Retrieves the default value.

Retrieves the default value.

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

Returns

array
The default value

Throws

RuntimeException
if the node has no default value

Overrides

Symfony\Component\Config\Definition\ArrayNode::getDefaultValue()
public
# setPrototype( Symfony\Component\Config\Definition\PrototypeNodeInterface $node )

Sets the node prototype.

Sets the node prototype.

Parameters

$node
Symfony\Component\Config\Definition\PrototypeNodeInterface
$node
public Symfony\Component\Config\Definition\PrototypeNodeInterface
# getPrototype( )

Retrieves the prototype

Retrieves the prototype

Returns

Symfony\Component\Config\Definition\PrototypeNodeInterface
The prototype
public
# addChild( Symfony\Component\Config\Definition\NodeInterface $node )

Disable adding concrete children for prototyped nodes.

Disable adding concrete children for prototyped nodes.

Parameters

$node
Symfony\Component\Config\Definition\NodeInterface
$node The child node to add

Throws

Symfony\Component\Config\Definition\Exception\Exception

Overrides

Symfony\Component\Config\Definition\ArrayNode::addChild()
protected mixed
# finalizeValue( mixed $value )

Finalizes the value of this node.

Finalizes the value of this node.

Parameters

$value
mixed
$value

Returns

mixed
The finalized value

Throws

Symfony\Component\Config\Definition\Exception\UnsetKeyException
Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
if the node doesn't have enough children

Overrides

Symfony\Component\Config\Definition\ArrayNode::finalizeValue()
protected mixed
# normalizeValue( mixed $value )

Normalizes the value.

Normalizes the value.

Parameters

$value
mixed
$value The value to normalize

Returns

mixed
The normalized value

Throws

Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
Symfony\Component\Config\Definition\Exception\DuplicateKeyException

Overrides

Symfony\Component\Config\Definition\ArrayNode::normalizeValue()
protected mixed
# mergeValues( mixed $leftSide, mixed $rightSide )

Merges values together.

Merges values together.

Parameters

$leftSide
mixed
$leftSide The left side to merge.
$rightSide
mixed
$rightSide The right side to merge.

Returns

mixed
The merged values

Throws

Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
RuntimeException

Overrides

Symfony\Component\Config\Definition\ArrayNode::mergeValues()
Methods inherited from Symfony\Component\Config\Definition\ArrayNode
getChildren(), preNormalize(), remapXml(), setAddIfNotSet(), setAllowFalse(), setAllowNewKeys(), setIgnoreExtraKeys(), setName(), setNormalizeKeys(), setPerformDeepMerging(), setXmlRemappings(), validateType()
Methods inherited from Symfony\Component\Config\Definition\BaseNode
addEquivalentValue(), finalize(), getAttribute(), getAttributes(), getExample(), getInfo(), getName(), getPath(), hasAttribute(), isRequired(), merge(), normalize(), removeAttribute(), setAllowOverwrite(), setAttribute(), setAttributes(), setExample(), setFinalValidationClosures(), setInfo(), setNormalizationClosures(), setRequired()
Properties summary
protected mixed $prototype
#
protected mixed $keyAttribute
#
protected mixed $removeKeyAttribute
#
protected mixed $minNumberOfElements
#
protected mixed $defaultValue
#
protected mixed $defaultChildren
#
Properties inherited from Symfony\Component\Config\Definition\ArrayNode
$addIfNotSet, $allowFalse, $allowNewKeys, $children, $ignoreExtraKeys, $normalizeKeys, $performDeepMerging, $xmlRemappings
Properties inherited from Symfony\Component\Config\Definition\BaseNode
$allowOverwrite, $attributes, $equivalentValues, $finalValidationClosures, $name, $normalizationClosures, $parent, $required
php-coveralls API documentation generated by ApiGen 2.8.0