protected function nodeToString(string $indent = ''): string
    {
        $str = $indent . "--{$this->getName()}--\n";

        foreach ($this->getChildren() as $child)
        {
            $str .= $child->nodeToString($indent . '  ');
        }

        return $str;
    }
protected function nodeToString(string $indent = ''): string
    {
        $str = $indent . "--{$this->getName()}--\n";

        foreach ($this->getChildren() as $child)
        {
            $str .= $child->nodeToString($indent . '  ');
        }

        return $str;
    }
protected function nodeToString ( string $ indent = '' ) : string { $ str = $ indent . "--{$this->getName()}--\n" ; foreach ( $ this -> getChildren ( ) as $ child ) { $ str .= $ child -> nodeToString ( $ indent . '  ' ) ; } return $ str ; }
Transforms the instance and its children into a string representation.

@param string $indent

@return string
Transforms the instance and its children into a string representation .