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.

Create the dependency database, if it doesn't exist. Error if the database is newer than the code reading it. (Previous) Get a list of dependencies of this installed package (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.