![]() |
Bearsampp 2026.9.23
|
Public Member Functions | |
| _dependsOn ($parent, $child, &$checked) | |
| _getDepDB () | |
| _lock ($mode=LOCK_EX) | |
| _registerDep (&$data, &$pkg, $dep, $type, $group=false) | |
| _setPackageDeps (&$data, &$pkg) | |
| _unlock () | |
| _writeDepDB (&$deps) | |
| assertDepsDB () | |
| dependsOn ($parent, $child) | |
| getDependencies (&$pkg) | |
| getDependentPackageDependencies (&$pkg) | |
| getDependentPackages (&$pkg) | |
| hasWriteAccess () | |
| installPackage (&$package) | |
| rebuildDB () | |
| setConfig (&$config, $depdb=false) | |
| uninstallPackage (&$pkg) | |
Static Public Member Functions | |
| static & | singleton (&$config, $depdb=false) |
Data Fields | |
| $_cache | |
| $_config | |
| $_depdb = false | |
| $_lockfile = false | |
| $_lockFp = false | |
| $_registry | |
| $_version = '1.0' | |
Definition at line 36 of file DependencyDB.php.
| _dependsOn | ( | $parent, | |
| $child, | |||
| & | $checked ) |
Definition at line 290 of file DependencyDB.php.
References _dependsOn().
Referenced by _dependsOn(), and dependsOn().
| _getDepDB | ( | ) |
Load the dependency database from disk, or return the cache
Definition at line 546 of file DependencyDB.php.
References $_cache, and hasWriteAccess().
Referenced by assertDepsDB(), dependsOn(), getDependencies(), getDependentPackageDependencies(), getDependentPackages(), installPackage(), and uninstallPackage().
| _lock | ( | $mode = LOCK_EX | ) |
Register usage of the dependency DB to prevent race conditions
| int | one of the LOCK_* constants |
Definition at line 476 of file DependencyDB.php.
Referenced by _unlock(), and _writeDepDB().
| _registerDep | ( | & | $data, |
| & | $pkg, | ||
| $dep, | |||
| $type, | |||
| $group = false ) |
| array | the database |
| PEAR_PackageFile_v1|PEAR_PackageFile_v2 | |
| array | the specific dependency |
| required|optional | whether this is a required or an optional dep |
| string|false | dependency group this dependency is from, or false for ordinary dep |
Definition at line 714 of file DependencyDB.php.
Referenced by _setPackageDeps().
| _setPackageDeps | ( | & | $data, |
| & | $pkg ) |
Register all dependencies from a package in the dependencies database, in essence "installing" the package's dependency information
| array | the database |
| PEAR_PackageFile_v1|PEAR_PackageFile_v2 | @access private |
Definition at line 599 of file DependencyDB.php.
References _registerDep().
Referenced by installPackage(), and rebuildDB().
| _unlock | ( | ) |
Release usage of dependency DB
Definition at line 532 of file DependencyDB.php.
References _lock().
Referenced by _writeDepDB().
| _writeDepDB | ( | & | $deps | ) |
Write out the dependency database to disk
| array | the database |
Definition at line 574 of file DependencyDB.php.
References _lock(), and _unlock().
Referenced by installPackage(), rebuildDB(), and uninstallPackage().
| assertDepsDB | ( | ) |
Create the dependency database, if it doesn't exist. Error if the database is newer than the code reading it.
Definition at line 164 of file DependencyDB.php.
References _getDepDB(), and rebuildDB().
| dependsOn | ( | $parent, | |
| $child ) |
Determine whether $parent depends on $child, near or deep
| array|PEAR_PackageFile_v2|PEAR_PackageFile_v2 | |
| array|PEAR_PackageFile_v2|PEAR_PackageFile_v2 |
Definition at line 283 of file DependencyDB.php.
References _dependsOn(), and _getDepDB().
| getDependencies | ( | & | $pkg | ) |
Get a list of dependencies of this installed package
| PEAR_PackageFile_v1|PEAR_PackageFile_v2|array |
Definition at line 260 of file DependencyDB.php.
References _getDepDB().
Referenced by getDependentPackageDependencies().
| getDependentPackageDependencies | ( | & | $pkg | ) |
Get a list of the actual dependencies of installed packages that depend on a package.
| PEAR_PackageFile_v1|PEAR_PackageFile_v2|array |
Definition at line 213 of file DependencyDB.php.
References _getDepDB(), getDependencies(), and getDependentPackages().
| getDependentPackages | ( | & | $pkg | ) |
Get a list of installed packages that depend on this package
| PEAR_PackageFile_v1|PEAR_PackageFile_v2|array |
Definition at line 189 of file DependencyDB.php.
References _getDepDB().
Referenced by getDependentPackageDependencies().
| hasWriteAccess | ( | ) |
Definition at line 136 of file DependencyDB.php.
References $_depdb.
Referenced by _getDepDB(), and rebuildDB().
| installPackage | ( | & | $package | ) |
Register dependencies of a package that is being installed or upgraded
| PEAR_PackageFile_v2|PEAR_PackageFile_v2 |
Definition at line 360 of file DependencyDB.php.
References _getDepDB(), _setPackageDeps(), and _writeDepDB().
| rebuildDB | ( | ) |
Rebuild the dependency DB by reading registry entries.
Definition at line 438 of file DependencyDB.php.
References _setPackageDeps(), _writeDepDB(), and hasWriteAccess().
Referenced by assertDepsDB().
| setConfig | ( | & | $config, |
| $depdb = false ) |
Set up the registry/location of dependency DB
| PEAR_Config|false | |
| string|false | full path to the dependency database, or false to use default |
Definition at line 113 of file DependencyDB.php.
References $config.
|
static |
Get a raw dependency database. Calls setConfig() and assertDepsDB()
| PEAR_Config | |
| string|false | full path to the dependency database, or false to use default |
Definition at line 92 of file DependencyDB.php.
References $config, and $GLOBALS.
Referenced by PEAR_Dependency2\__construct(), PEAR_Registry\_initializeDepDB(), and PEAR_Installer\sortPackagesForUninstall().
| uninstallPackage | ( | & | $pkg | ) |
Remove dependencies of a package that is being uninstalled, or upgraded.
Upgraded packages first uninstall, then install
| PEAR_PackageFile_v1|PEAR_PackageFile_v2|array | If an array, then it must have indices 'channel' and 'package' |
Definition at line 375 of file DependencyDB.php.
References _getDepDB(), and _writeDepDB().
| $_cache |
Definition at line 81 of file DependencyDB.php.
Referenced by _getDepDB().
| $_config |
Definition at line 45 of file DependencyDB.php.
| $_depdb = false |
Definition at line 57 of file DependencyDB.php.
Referenced by hasWriteAccess().
| $_lockfile = false |
Definition at line 63 of file DependencyDB.php.
| $_lockFp = false |
Definition at line 69 of file DependencyDB.php.
| $_registry |
Definition at line 51 of file DependencyDB.php.
| $_version = '1.0' |
Definition at line 75 of file DependencyDB.php.