function isSubpackage($p)
    {
        $sub = array();
        if (isset($this->_packageInfo['dependencies']['required']['subpackage'])) {
            $sub = $this->_packageInfo['dependencies']['required']['subpackage'];
            if (!isset($sub[0])) {
                $sub = array($sub);
            }
        }
        if (isset($this->_packageInfo['dependencies']['optional']['subpackage'])) {
            $sub1 = $this->_packageInfo['dependencies']['optional']['subpackage'];
            if (!isset($sub1[0])) {
                $sub1 = array($sub1);
            }
            $sub = array_merge($sub, $sub1);
        }
        if (isset($this->_packageInfo['dependencies']['group'])) {
            $group = $this->_packageInfo['dependencies']['group'];
            if (!isset($group[0])) {
                $group = array($group);
            }
            foreach ($group as $deps) {
                if (isset($deps['subpackage'])) {
                    $sub2 = $deps['subpackage'];
                    if (!isset($sub2[0])) {
                        $sub2 = array($sub2);
                    }
                    $sub = array_merge($sub, $sub2);
                }
            }
        }
        foreach ($sub as $dep) {
            if (strtolower($dep['name']) == strtolower($p->getPackage())) {
                if (isset($dep['channel'])) {
                    if (strtolower($dep['channel']) == strtolower($p->getChannel())) {
                        return true;
                    }
                } else {
                    if ($dep['uri'] == $p->getURI()) {
                        return true;
                    }
                }
            }
        }
        return false;
    }
function isSubpackage($p)
    {
        $sub = array();
        if (isset($this->_packageInfo['dependencies']['required']['subpackage'])) {
            $sub = $this->_packageInfo['dependencies']['required']['subpackage'];
            if (!isset($sub[0])) {
                $sub = array($sub);
            }
        }
        if (isset($this->_packageInfo['dependencies']['optional']['subpackage'])) {
            $sub1 = $this->_packageInfo['dependencies']['optional']['subpackage'];
            if (!isset($sub1[0])) {
                $sub1 = array($sub1);
            }
            $sub = array_merge($sub, $sub1);
        }
        if (isset($this->_packageInfo['dependencies']['group'])) {
            $group = $this->_packageInfo['dependencies']['group'];
            if (!isset($group[0])) {
                $group = array($group);
            }
            foreach ($group as $deps) {
                if (isset($deps['subpackage'])) {
                    $sub2 = $deps['subpackage'];
                    if (!isset($sub2[0])) {
                        $sub2 = array($sub2);
                    }
                    $sub = array_merge($sub, $sub2);
                }
            }
        }
        foreach ($sub as $dep) {
            if (strtolower($dep['name']) == strtolower($p->getPackage())) {
                if (isset($dep['channel'])) {
                    if (strtolower($dep['channel']) == strtolower($p->getChannel())) {
                        return true;
                    }
                } else {
                    if ($dep['uri'] == $p->getURI()) {
                        return true;
                    }
                }
            }
        }
        return false;
    }
function isSubpackage ( $ p ) { $ sub = array ( ) ; if ( isset ( $ this -> _packageInfo [ 'dependencies' ] [ 'required' ] [ 'subpackage' ] ) ) { $ sub = $ this -> _packageInfo [ 'dependencies' ] [ 'required' ] [ 'subpackage' ] ; if ( ! isset ( $ sub [ 0 ] ) ) { $ sub = array ( $ sub ) ; } } if ( isset ( $ this -> _packageInfo [ 'dependencies' ] [ 'optional' ] [ 'subpackage' ] ) ) { $ sub1 = $ this -> _packageInfo [ 'dependencies' ] [ 'optional' ] [ 'subpackage' ] ; if ( ! isset ( $ sub1 [ 0 ] ) ) { $ sub1 = array ( $ sub1 ) ; } $ sub = array_merge ( $ sub , $ sub1 ) ; } if ( isset ( $ this -> _packageInfo [ 'dependencies' ] [ 'group' ] ) ) { $ group = $ this -> _packageInfo [ 'dependencies' ] [ 'group' ] ; if ( ! isset ( $ group [ 0 ] ) ) { $ group = array ( $ group ) ; } foreach ( $ group as $ deps ) { if ( isset ( $ deps [ 'subpackage' ] ) ) { $ sub2 = $ deps [ 'subpackage' ] ; if ( ! isset ( $ sub2 [ 0 ] ) ) { $ sub2 = array ( $ sub2 ) ; } $ sub = array_merge ( $ sub , $ sub2 ) ; } } } foreach ( $ sub as $ dep ) { if ( strtolower ( $ dep [ 'name' ] ) == strtolower ( $ p -> getPackage ( ) ) ) { if ( isset ( $ dep [ 'channel' ] ) ) { if ( strtolower ( $ dep [ 'channel' ] ) == strtolower ( $ p -> getChannel ( ) ) ) { return true ; } } else { if ( $ dep [ 'uri' ] == $ p -> getURI ( ) ) { return true ; } } } } return false ; }
Determines whether the passed in package is a subpackage of this package.

No version checking is done, only name verification.
@param PEAR_PackageFile_v1|PEAR_PackageFile_v2
@return bool
Determines whether the passed in package is a subpackage of this package .