/**
  * Create prototype array node.
  *
  * @return PrototypeArrayNode
  */
 private function instantiatePrototypeArrayNode()
 {
     $node = new PrototypeArrayNode($this->name, $this->parent);
     if ($this->defaultValueSet) {
         $node->setDefaultValue($this->defaultValue);
     }
     $this->prototype->setParent($node);
     $node->setPrototype($this->prototype->getNode());
     return $node;
 }
 /**
  * Append node to parent.
  *
  * @param NodeDefinitionInterface $node
  *
  * @return $this
  */
 public function append(NodeDefinitionInterface $node)
 {
     if ($node instanceof NodeDefinitionContainerInterface) {
         $builder = clone $this;
         $builder->setParent(null);
         $node->setBuilder($builder);
     }
     if (null !== $this->parent) {
         $this->parent->append($node);
         $node->setParent($this);
     }
     return $this;
 }