function getDependentPackageDependencies(&$pkg)
    {
        $data = $this->_getDepDB();
        if (is_object($pkg)) {
            $channel = strtolower($pkg->getChannel());
            $package = strtolower($pkg->getPackage());
        } else {
            $channel = strtolower($pkg['channel']);
            $package = strtolower($pkg['package']);
        }

        $depend = $this->getDependentPackages($pkg);
        if (!$depend) {
            return false;
        }

        $dependencies = array();
        foreach ($depend as $info) {
            $temp = $this->getDependencies($info);
            foreach ($temp as $dep) {
                if (
                    isset($dep['dep'], $dep['dep']['channel'], $dep['dep']['name']) &&
                    strtolower($dep['dep']['channel']) == $channel &&
                    strtolower($dep['dep']['name']) == $package
                ) {
                    if (!isset($dependencies[$info['channel']])) {
                        $dependencies[$info['channel']] = array();
                    }

                    if (!isset($dependencies[$info['channel']][$info['package']])) {
                        $dependencies[$info['channel']][$info['package']] = array();
                    }
                    $dependencies[$info['channel']][$info['package']][] = $dep;
                }
            }
        }

        return $dependencies;
    }
function getDependentPackageDependencies(&$pkg)
    {
        $data = $this->_getDepDB();
        if (is_object($pkg)) {
            $channel = strtolower($pkg->getChannel());
            $package = strtolower($pkg->getPackage());
        } else {
            $channel = strtolower($pkg['channel']);
            $package = strtolower($pkg['package']);
        }

        $depend = $this->getDependentPackages($pkg);
        if (!$depend) {
            return false;
        }

        $dependencies = array();
        foreach ($depend as $info) {
            $temp = $this->getDependencies($info);
            foreach ($temp as $dep) {
                if (
                    isset($dep['dep'], $dep['dep']['channel'], $dep['dep']['name']) &&
                    strtolower($dep['dep']['channel']) == $channel &&
                    strtolower($dep['dep']['name']) == $package
                ) {
                    if (!isset($dependencies[$info['channel']])) {
                        $dependencies[$info['channel']] = array();
                    }

                    if (!isset($dependencies[$info['channel']][$info['package']])) {
                        $dependencies[$info['channel']][$info['package']] = array();
                    }
                    $dependencies[$info['channel']][$info['package']][] = $dep;
                }
            }
        }

        return $dependencies;
    }
function getDependentPackageDependencies ( & $ pkg ) { $ data = $ this -> _getDepDB ( ) ; if ( is_object ( $ pkg ) ) { $ channel = strtolower ( $ pkg -> getChannel ( ) ) ; $ package = strtolower ( $ pkg -> getPackage ( ) ) ; } else { $ channel = strtolower ( $ pkg [ 'channel' ] ) ; $ package = strtolower ( $ pkg [ 'package' ] ) ; } $ depend = $ this -> getDependentPackages ( $ pkg ) ; if ( ! $ depend ) { return false ; } $ dependencies = array ( ) ; foreach ( $ depend as $ info ) { $ temp = $ this -> getDependencies ( $ info ) ; foreach ( $ temp as $ dep ) { if ( isset ( $ dep [ 'dep' ] , $ dep [ 'dep' ] [ 'channel' ] , $ dep [ 'dep' ] [ 'name' ] ) && strtolower ( $ dep [ 'dep' ] [ 'channel' ] ) == $ channel && strtolower ( $ dep [ 'dep' ] [ 'name' ] ) == $ package ) { if ( ! isset ( $ dependencies [ $ info [ 'channel' ] ] ) ) { $ dependencies [ $ info [ 'channel' ] ] = array ( ) ; } if ( ! isset ( $ dependencies [ $ info [ 'channel' ] ] [ $ info [ 'package' ] ] ) ) { $ dependencies [ $ info [ 'channel' ] ] [ $ info [ 'package' ] ] = array ( ) ; } $ dependencies [ $ info [ 'channel' ] ] [ $ info [ 'package' ] ] [ ] = $ dep ; } } } return $ dependencies ; }
Get a list of the actual dependencies of installed packages that depend on
a package.
@param PEAR_PackageFile_v1|PEAR_PackageFile_v2|array
@return array|false
Get a list of the actual dependencies of installed packages that depend on a package .