private function groupResults()
    {
        $result = array();
        foreach ($this->nodes as $node => $component) {
            if (array_key_exists($component, $result)) {
                $result[$component][] = $node;
            } else {
                $result[$component] = array($node);
            }
        }

        return $result;
    }
private function groupResults()
    {
        $result = array();
        foreach ($this->nodes as $node => $component) {
            if (array_key_exists($component, $result)) {
                $result[$component][] = $node;
            } else {
                $result[$component] = array($node);
            }
        }

        return $result;
    }
private function groupResults ( ) { $ result = array ( ) ; foreach ( $ this -> nodes as $ node => $ component ) { if ( array_key_exists ( $ component , $ result ) ) { $ result [ $ component ] [ ] = $ node ; } else { $ result [ $ component ] = array ( $ node ) ; } } return $ result ; }
Group the nodes by component.

@return array
Group the nodes by component .