PHP Класс Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition

Автор: Johannes M. Schmitt ([email protected])
Наследование: extends Symfony\Component\Config\Definition\Builder\NodeDefinition, implements Symfony\Component\Config\Definition\Builder\ParentNodeDefinitionInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$addDefaultChildren
$addDefaults
$allowNewKeys
$atLeastOne
$children
$ignoreExtraKeys
$key
$nodeBuilder
$normalizeKeys
$performDeepMerging
$prototype
$removeExtraKeys
$removeKeyItem

Открытые методы

Метод Описание
__construct ( $name, NodeParentInterface $parent = null )
addDefaultChildrenIfNoneSet ( integer | string | array | null $children = null ) : ArrayNodeDefinition Adds children with a default value when none are defined.
addDefaultsIfNotSet ( ) : ArrayNodeDefinition Adds the default value if the node is not set in the configuration.
append ( Symfony\Component\Config\Definition\Builder\NodeDefinition $node ) : ArrayNodeDefinition Appends a node definition.
arrayPrototype ( ) : ArrayNodeDefinition
booleanPrototype ( ) : Symfony\Component\Config\Definition\Builder\BooleanNodeDefinition
canBeDisabled ( ) : ArrayNodeDefinition Adds an "enabled" boolean to enable the current section.
canBeEnabled ( ) : ArrayNodeDefinition Adds an "enabled" boolean to enable the current section.
canBeUnset ( boolean $allow = true ) : ArrayNodeDefinition Sets whether the node can be unset.
children ( ) : Symfony\Component\Config\Definition\Builder\NodeBuilder Returns a builder to add children nodes.
disallowNewKeysInSubsequentConfigs ( ) : ArrayNodeDefinition Disallows adding news keys in a subsequent configuration.
enumPrototype ( ) : Symfony\Component\Config\Definition\Builder\EnumNodeDefinition
fixXmlConfig ( string $singular, string $plural = null ) : ArrayNodeDefinition Sets a normalization rule for XML configurations.
floatPrototype ( ) : Symfony\Component\Config\Definition\Builder\FloatNodeDefinition
ignoreExtraKeys ( boolean $remove = true ) : ArrayNodeDefinition Allows extra config keys to be specified under an array without throwing an exception.
integerPrototype ( ) : Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition
normalizeKeys ( boolean $bool ) : ArrayNodeDefinition Sets key normalization.
performNoDeepMerging ( ) : ArrayNodeDefinition Disables the deep merging of the node.
prototype ( string $type ) : Symfony\Component\Config\Definition\Builder\NodeDefinition Sets a prototype for child nodes.
requiresAtLeastOneElement ( ) : ArrayNodeDefinition Requires the node to have at least one element.
scalarPrototype ( ) : Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition
setBuilder ( Symfony\Component\Config\Definition\Builder\NodeBuilder $builder ) Sets a custom children builder.
useAttributeAsKey ( string $name, boolean $removeKeyItem = true ) : ArrayNodeDefinition Sets the attribute which value is to be used as key.
variablePrototype ( ) : Symfony\Component\Config\Definition\Builder\VariableNodeDefinition

Защищенные методы

Метод Описание
createNode ( )
getNodeBuilder ( ) : Symfony\Component\Config\Definition\Builder\NodeBuilder Returns a node builder to be used to add children and prototype.
validateConcreteNode ( Symfony\Component\Config\Definition\ArrayNode $node ) Validate the configuration of a concrete node.
validatePrototypeNode ( PrototypedArrayNode $node ) Validate the configuration of a prototype node.

Описание методов

__construct() публичный Метод

public __construct ( $name, NodeParentInterface $parent = null )
$parent NodeParentInterface

addDefaultChildrenIfNoneSet() публичный Метод

Adds children with a default value when none are defined.
public addDefaultChildrenIfNoneSet ( integer | string | array | null $children = null ) : ArrayNodeDefinition
$children integer | string | array | null The number of children|The child name|The children names to be added This method is applicable to prototype nodes only.
Результат ArrayNodeDefinition

addDefaultsIfNotSet() публичный Метод

This method is applicable to concrete nodes only (not to prototype nodes). If this function has been called and the node is not set during the finalization phase, it's default value will be derived from its children default values.
public addDefaultsIfNotSet ( ) : ArrayNodeDefinition
Результат ArrayNodeDefinition

append() публичный Метод

$node = new ArrayNodeDefinition() ->children() ->scalarNode('foo')->end() ->scalarNode('baz')->end() ->end() ->append($this->getBarNodeDefinition()) ;
public append ( Symfony\Component\Config\Definition\Builder\NodeDefinition $node ) : ArrayNodeDefinition
$node Symfony\Component\Config\Definition\Builder\NodeDefinition A NodeDefinition instance
Результат ArrayNodeDefinition This node

arrayPrototype() публичный Метод

public arrayPrototype ( ) : ArrayNodeDefinition
Результат ArrayNodeDefinition

booleanPrototype() публичный Метод

public booleanPrototype ( ) : Symfony\Component\Config\Definition\Builder\BooleanNodeDefinition
Результат Symfony\Component\Config\Definition\Builder\BooleanNodeDefinition

canBeDisabled() публичный Метод

By default, the section is enabled.
public canBeDisabled ( ) : ArrayNodeDefinition
Результат ArrayNodeDefinition

canBeEnabled() публичный Метод

By default, the section is disabled. If any configuration is specified then the node will be automatically enabled: enableableArrayNode: {enabled: true, ...} # The config is enabled & default values get overridden enableableArrayNode: ~ # The config is enabled & use the default values enableableArrayNode: true # The config is enabled & use the default values enableableArrayNode: {other: value, ...} # The config is enabled & default values get overridden enableableArrayNode: {enabled: false, ...} # The config is disabled enableableArrayNode: false # The config is disabled
public canBeEnabled ( ) : ArrayNodeDefinition
Результат ArrayNodeDefinition

canBeUnset() публичный Метод

Sets whether the node can be unset.
public canBeUnset ( boolean $allow = true ) : ArrayNodeDefinition
$allow boolean
Результат ArrayNodeDefinition

children() публичный Метод

Returns a builder to add children nodes.
public children ( ) : Symfony\Component\Config\Definition\Builder\NodeBuilder
Результат Symfony\Component\Config\Definition\Builder\NodeBuilder

createNode() защищенный Метод

protected createNode ( )

disallowNewKeysInSubsequentConfigs() публичный Метод

If used all keys have to be defined in the same configuration file.
public disallowNewKeysInSubsequentConfigs ( ) : ArrayNodeDefinition
Результат ArrayNodeDefinition

enumPrototype() публичный Метод

public enumPrototype ( ) : Symfony\Component\Config\Definition\Builder\EnumNodeDefinition
Результат Symfony\Component\Config\Definition\Builder\EnumNodeDefinition

fixXmlConfig() публичный Метод

Sets a normalization rule for XML configurations.
public fixXmlConfig ( string $singular, string $plural = null ) : ArrayNodeDefinition
$singular string The key to remap
$plural string The plural of the key for irregular plurals
Результат ArrayNodeDefinition

floatPrototype() публичный Метод

public floatPrototype ( ) : Symfony\Component\Config\Definition\Builder\FloatNodeDefinition
Результат Symfony\Component\Config\Definition\Builder\FloatNodeDefinition

getNodeBuilder() защищенный Метод

Returns a node builder to be used to add children and prototype.
protected getNodeBuilder ( ) : Symfony\Component\Config\Definition\Builder\NodeBuilder
Результат Symfony\Component\Config\Definition\Builder\NodeBuilder The node builder

ignoreExtraKeys() публичный Метод

Those config values are simply ignored and removed from the resulting array. This should be used only in special cases where you want to send an entire configuration array through a special tree that processes only part of the array.
public ignoreExtraKeys ( boolean $remove = true ) : ArrayNodeDefinition
$remove boolean Whether to remove the extra keys
Результат ArrayNodeDefinition

integerPrototype() публичный Метод

public integerPrototype ( ) : Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition
Результат Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition

normalizeKeys() публичный Метод

Sets key normalization.
public normalizeKeys ( boolean $bool ) : ArrayNodeDefinition
$bool boolean Whether to enable key normalization
Результат ArrayNodeDefinition

performNoDeepMerging() публичный Метод

Disables the deep merging of the node.
public performNoDeepMerging ( ) : ArrayNodeDefinition
Результат ArrayNodeDefinition

prototype() публичный Метод

Sets a prototype for child nodes.
public prototype ( string $type ) : Symfony\Component\Config\Definition\Builder\NodeDefinition
$type string the type of node
Результат Symfony\Component\Config\Definition\Builder\NodeDefinition

requiresAtLeastOneElement() публичный Метод

This method is applicable to prototype nodes only.
public requiresAtLeastOneElement ( ) : ArrayNodeDefinition
Результат ArrayNodeDefinition

scalarPrototype() публичный Метод

public scalarPrototype ( ) : Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition
Результат Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition

setBuilder() публичный Метод

Sets a custom children builder.
public setBuilder ( Symfony\Component\Config\Definition\Builder\NodeBuilder $builder )
$builder Symfony\Component\Config\Definition\Builder\NodeBuilder A custom NodeBuilder

useAttributeAsKey() публичный Метод

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. This method is applicable to prototype nodes only.
public useAttributeAsKey ( string $name, boolean $removeKeyItem = true ) : ArrayNodeDefinition
$name string The name of the key
$removeKeyItem boolean Whether or not the key item should be removed
Результат ArrayNodeDefinition

validateConcreteNode() защищенный Метод

Validate the configuration of a concrete node.
protected validateConcreteNode ( Symfony\Component\Config\Definition\ArrayNode $node )
$node Symfony\Component\Config\Definition\ArrayNode The related node

validatePrototypeNode() защищенный Метод

Validate the configuration of a prototype node.
protected validatePrototypeNode ( PrototypedArrayNode $node )
$node Symfony\Component\Config\Definition\PrototypedArrayNode The related node

variablePrototype() публичный Метод

public variablePrototype ( ) : Symfony\Component\Config\Definition\Builder\VariableNodeDefinition
Результат Symfony\Component\Config\Definition\Builder\VariableNodeDefinition

Описание свойств

$addDefaultChildren защищенное свойство

protected $addDefaultChildren

$addDefaults защищенное свойство

protected $addDefaults

$allowNewKeys защищенное свойство

protected $allowNewKeys

$atLeastOne защищенное свойство

protected $atLeastOne

$children защищенное свойство

protected $children

$ignoreExtraKeys защищенное свойство

protected $ignoreExtraKeys

$key защищенное свойство

protected $key

$nodeBuilder защищенное свойство

protected $nodeBuilder

$normalizeKeys защищенное свойство

protected $normalizeKeys

$performDeepMerging защищенное свойство

protected $performDeepMerging

$prototype защищенное свойство

protected $prototype

$removeExtraKeys защищенное свойство

protected $removeExtraKeys

$removeKeyItem защищенное свойство

protected $removeKeyItem