rootDoc::packageNamed PHP Method

packageNamed() public method

Return a reference to a packageDoc for the specified package name. If a package of the requested name does not exist, this method will create the package object, add it to the root and return it.
public packageNamed ( $name, $create = FALSE ) : PackageDoc
return PackageDoc
    function &packageNamed($name, $create = FALSE)
    {
        $return = NULL;
        if (isset($this->_packages[$name])) {
            $return =& $this->_packages[$name];
        } elseif ($create) {
            $newPackage =& new packageDoc($name, $this);
            $this->addPackage($newPackage);
            $return =& $newPackage;
        }
        return $return;
    }