PEAR_DependencyDB::dependsOn()

PEAR_DependencyDB::dependsOn()  -- Determine whether $parent depends on $child, near or deep

Synopsis

require_once '/DependencyDB.php';

void PEAR_DependencyDB::dependsOn (array|PEAR_PackageFile_v2|PEAR_PackageFile_v2 $parent, array|PEAR_PackageFile_v2|PEAR_PackageFile_v2 $child)

Description

This method is the central method of DependencyDB. Through the dependency database, it is possible to determine whether any two packages share a dependency relationship independent of how tightly bound the two packages are. In other words, if package A depends on package B depends on package C, this method can be used to determine that package A indirectly depends on package C.

Parameter

array|PEAR_PackageFile_v2|PEAR_PackageFile_v2 $parent

The parent package (as in package A in the example above)

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

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

array|PEAR_PackageFile_v2|PEAR_PackageFile_v2 $child

The child package (as in package B or package C in the example above)

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.