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
파일 보기 프로젝트 열기: symfony/symfony 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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