public function node($name, $type)
    {
        $class = $this->getNodeClass($type);

        $node = new $class($name);

        $this->append($node);

        return $node;
    }
public function node($name, $type)
    {
        $class = $this->getNodeClass($type);

        $node = new $class($name);

        $this->append($node);

        return $node;
    }
public function node ( $ name , $ type ) { $ class = $ this -> getNodeClass ( $ type ) ; $ node = new $ class ( $ name ) ; $ this -> append ( $ node ) ; return $ node ; }
Creates a child node.

@param string|null $name The name of the node
@param string      $type The type of the node

@return NodeDefinition The child node

@throws \RuntimeException When the node type is not registered
@throws \RuntimeException When the node class is not found
Creates a child node .