/** * Constructor. * * @param string $name The Node's name * @param NodeInterface $parent The node parent */ public function __construct($name, NodeInterface $parent = null) { parent::__construct($name, $parent); $this->children = array(); $this->xmlRemappings = array(); $this->removeKeyAttribute = true; $this->allowFalse = false; $this->addIfNotSet = false; $this->allowNewKeys = true; $this->performDeepMerging = true; }
protected function getStandardOptions(BaseNode $node) { return ['required' => $node->isRequired()]; }
/** * @param BaseNode $node * @param int $depth */ private function outputInformations(BaseNode $node, $depth) { if ($info = $node->getInfo()) { $this->writeLine(''); $info = str_replace("\n", sprintf("\n%" . $depth * 4 . 's// ', ' '), $info); $this->writeComment($info, $depth * 4); if ($this->isCoreNode) { $this->writeLine(str_repeat('/', 70), $depth * 4); $this->writeLine(''); } } }
public function __construct(BaseNode $parentNode, $nodeName) { parent::__construct(sprintf('Child node "%s" is not an array node (current path: "%s")', $nodeName, $parentNode->getPath())); }