class PEAR_Dependency
{
-
+ function PEAR_Dependency(&$registry)
+ {
+ $this->registry = &$registry;
+ }
/**
* This method maps the xml dependency definition to the
* PEAR_dependecy one
*/
function checkPackage($name, $req = null, $relation = 'has')
{
- if (empty($this->registry)) {
- $this->registry = new PEAR_Registry;
- }
if (!$this->registry->packageExists($name)) {
return "'$name' PEAR package is not installed";
}
// - soft : fail silently
//
if (empty($this->registry)) {
- $this->registry = new PEAR_Registry($this->config->get('php_dir'));
+ $this->registry = &new PEAR_Registry($this->config->get('php_dir'));
}
$oldcwd = getcwd();
$need_download = false;
function checkDeps(&$pkginfo)
{
- $deps = new PEAR_Dependency;
+ $deps = &new PEAR_Dependency($this->registry);
$errors = null;
if (is_array($pkginfo['release_deps'])) {
foreach($pkginfo['release_deps'] as $dep) {