rootDoc::globals PHP Method

globals() public method

Return a reference to the globals to be documented.
public globals ( ) : FieldDoc[]
return FieldDoc[]
    function &globals()
    {
        $globals = array();
        $packages = $this->packages();
        // not by reference so as not to move the internal array pointer
        foreach ($packages as $name => $package) {
            $packageGlobals = $this->_packages[$name]->globals();
            // not by reference so as not to move the internal array pointer
            if ($packageGlobals) {
                foreach ($packageGlobals as $key => $pack) {
                    $globals[$name . '.' . $key] =& $packageGlobals[$key];
                }
            }
        }
        ksort($globals);
        return $globals;
    }