protected function createArrayConfigNode(NodeBuilder $node) { $configNode = new ArrayNode($node->name, $node->parent); $configNode->setAddIfNotSet($node->addDefaults); $configNode->setAllowNewKeys($node->allowNewKeys); $configNode->addEquivalentValue(null, $node->nullEquivalent); $configNode->addEquivalentValue(true, $node->trueEquivalent); $configNode->addEquivalentValue(false, $node->falseEquivalent); $configNode->setPerformDeepMerging($node->performDeepMerging); if (null !== $node->key) { $configNode->setKeyAttribute($node->key); } if (true === $node->atLeastOne) { $configNode->setMinNumberOfElements(1); } if (null !== $node->normalization) { $configNode->setNormalizationClosures($this->buildExpressions($node->normalization->before)); $configNode->setXmlRemappings($node->normalization->remappings); } if (null !== $node->merge) { $configNode->setAllowOverwrite($node->merge->allowOverwrite); $configNode->setAllowFalse($node->merge->allowFalse); } foreach ($node->children as $child) { $child->parent = $configNode; $configNode->addChild($this->createConfigNode($child)); } if (null !== $node->prototype) { $node->prototype->parent = $configNode; $configNode->setPrototype($this->createConfigNode($node->prototype)); } return $configNode; }
protected function createArrayConfigNode(NodeBuilder $node) { $configNode = new ArrayNode($node->name, $node->parent, $node->beforeTransformations, $node->afterTransformations, $node->normalizeTransformations, $node->key); foreach ($node->children as $child) { $child->parent = $configNode; $configNode->addChild($this->createConfigNode($child)); } if (null !== $node->prototype) { $node->prototype->parent = $configNode; $configNode->setPrototype($this->createConfigNode($node->prototype)); } return $configNode; }