protected function buildPackageTree(\DOMDocument $dom)
    {
        $xpath = new \DOMXPath($dom);
        $packages = array('global' => true);
        $qry = $xpath->query('//@package');
        for ($i = 0; $i < $qry->length; $i++) {
            if (isset($packages[$qry->item($i)->nodeValue])) {
                continue;
            }

            $packages[$qry->item($i)->nodeValue] = true;
        }

        $packages = $this->generateNamespaceTree(array_keys($packages));
        $this->generateNamespaceElements($packages, $dom->documentElement, 'package');
    }
protected function buildPackageTree(\DOMDocument $dom)
    {
        $xpath = new \DOMXPath($dom);
        $packages = array('global' => true);
        $qry = $xpath->query('//@package');
        for ($i = 0; $i < $qry->length; $i++) {
            if (isset($packages[$qry->item($i)->nodeValue])) {
                continue;
            }

            $packages[$qry->item($i)->nodeValue] = true;
        }

        $packages = $this->generateNamespaceTree(array_keys($packages));
        $this->generateNamespaceElements($packages, $dom->documentElement, 'package');
    }
protected function buildPackageTree ( \ DOMDocument $ dom ) { $ xpath = new \ DOMXPath ( $ dom ) ; $ packages = array ( 'global' => true ) ; $ qry = $ xpath -> query ( '//@package' ) ; for ( $ i = 0 ; $ i < $ qry -> length ; $ i ++ ) { if ( isset ( $ packages [ $ qry -> item ( $ i ) -> nodeValue ] ) ) { continue ; } $ packages [ $ qry -> item ( $ i ) -> nodeValue ] = true ; } $ packages = $ this -> generateNamespaceTree ( array_keys ( $ packages ) ) ; $ this -> generateNamespaceElements ( $ packages , $ dom -> documentElement , 'package' ) ; }
Collects all packages and subpackages, and adds a new section in the
DOM to provide an overview.

@param \DOMDocument $dom Packages are extracted and a summary inserted
in this object.

@return void
Collects all packages and subpackages and adds a new section in the DOM to provide an overview .