TeamSpeak3/Node/AbstractNode.php
public function getViewer(IViewer $viewer)
    {
        $html = $viewer->fetchObject($this);

        $iterator = new \RecursiveIteratorIterator($this, \RecursiveIteratorIterator::SELF_FIRST);

        foreach ($iterator as $node) {
            $siblings = array();

            for ($level = 0; $level < $iterator->getDepth(); $level++) {
                $siblings[] = ($iterator->getSubIterator($level)->hasNext()) ? 1 : 0;
            }

            $siblings[] = (!$iterator->getSubIterator($level)->hasNext()) ? 1 : 0;

            $html .= $viewer->fetchObject($node, $siblings);
        }

        return $html;
    }
public function getViewer(IViewer $viewer)
    {
        $html = $viewer->fetchObject($this);

        $iterator = new \RecursiveIteratorIterator($this, \RecursiveIteratorIterator::SELF_FIRST);

        foreach ($iterator as $node) {
            $siblings = array();

            for ($level = 0; $level < $iterator->getDepth(); $level++) {
                $siblings[] = ($iterator->getSubIterator($level)->hasNext()) ? 1 : 0;
            }

            $siblings[] = (!$iterator->getSubIterator($level)->hasNext()) ? 1 : 0;

            $html .= $viewer->fetchObject($node, $siblings);
        }

        return $html;
    }
Returns the HTML code to display a TeamSpeak 3 viewer.

@param  IViewer $viewer
@return string