PEAR_DependencyDB::getDependentPackageDependencies

PEAR_DependencyDB::getDependentPackageDependencies() – Get a list of the actual dependencies of installed packages that depend on a package.

Synopsis

require_once '/DependencyDB.php';

array|false PEAR_DependencyDB::getDependentPackageDependencies ( PEAR_PackageFile_v1|PEAR_PackageFile_v2|array &$pkg )

Description

This returns the complete tree of extended dependencies of a single installed package.

For instance, a real-world example. package SOAP depends on Mail_Mime, HTTP_Request, Net_URL, Net_DIME. package HTTP_Request depends on Net_URL, Net_Socket. This method will return an array similar to:


<?php
array(
    'pear.php.net' =>
        array(
            'mail_mime' =>
                array('name' => 'Mail_Mime',
                      'channel' => 'pear.php.net'),
            'http_request' =>
                array('name' => 'HTTP_Request',
                      'channel' => 'pear.php.net'),
            'net_url' =>
                array('name' => 'Net_URL',
                      'channel' => 'pear.php.net',
                      'min' => '1.0.12'),
            'net_dime' =>
                array('name' => 'Net_DIME',
                      'channel' => 'pear.php.net'),
            'net_socket' =>
                array('name' => 'Net_Socket',
                      'channel' => 'pear.php.net'),
        ),
);
?>

Note that this should not be relied upon for exact dependencies. In the example above, the returned dependency will be that of HTTP_Request upon Net_URL, which is stricter than SOAP's dependency upon Net_URL. In other words, if there are two similar dependencies, the last one encountered will be returned.

Parameter

PEAR_PackageFile_v1|PEAR_PackageFile_v2|array &$pkg

This parameter, if an array, should be in format:


<?php
array(
  'package' => 'packagename',
  'channel' => 'channelname'
);
?>

Throws

throws no exceptions thrown

Note

This function can not be called statically.

Get a list of dependencies of this installed package (Previous) Get a list of installed packages that depend on this package (Next)
Last updated: Fri, 19 Dec 2014 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.