Constructor
void
PEAR_Dependency
(object Registry &$registry)
-
object Registry
&$registry: object
This method maps the XML dependency definition to the corresponding one from PEAR_Dependency
$opts => Array
(
[type] => pkg
[rel] => ge
[version] => 3.4
[name] => HTML_Common
[optional] => false
)
boolean
callCheckMethod
(string &$errmsg, array $opts)
-
string
&$errmsg: Error message
-
array
$opts: Options
Extension dependencies check method
mixed
checkExtension
(mixed &$errmsg, string $name, [mixed $req = null], [string $relation = 'has'], [bool $opt = false], string $req_ext_ver)
-
string
$name: Name of the extension to test
-
string
$req_ext_ver: Required extension version to compare with
-
string
$relation: How to compare versions with eachother
-
bool
$opt: Whether the relationship is optional
Operating system dependencies check method
mixed
checkOS
(mixed &$errmsg, string $os)
-
string
$os: Name of the operating system
Package dependencies check method
mixed
checkPackage
(string &$errmsg, string $name, [string $req = null], [string $relation = 'has'], [bool $opt = false])
-
string
$errmsg: Empty string, it will be populated with an error message, if any
-
string
$name: Name of the package to test
-
string
$req: The package version required
-
string
$relation: How to compare versions with each other
-
bool
$opt: Whether the relationship is optional
Check package dependencies on uninstall
bool
checkPackageUninstall
(string &$error, string &$warning, mixed $package, string $name)
-
string
$error: The resultant error string
-
string
$warning: The resultant warning string
-
string
$name: Name of the package to test
PHP version check method
mixed
checkPHP
(mixed &$errmsg, string $req, [string $relation = 'ge'])
-
string
$req: which version to compare
-
string
$relation: how to compare the version
External program check method. Looks for executable files in directories listed in the PATH environment variable.
mixed
checkProgram
(mixed &$errmsg, string $program)
-
string
$program: which program to look for
SAPI backend check method. Version comparison is not yet available here.
mixed
checkSAPI
(mixed &$errmsg, string $name, [string $req = null], [string $relation = 'has'])
-
string
$name: name of SAPI backend
-
string
$req: which version to compare
-
string
$relation: how to compare versions (currently hardcoded to 'has')
Zend version check method
mixed
checkZend
(mixed &$errmsg, string $req, [string $relation = 'ge'])
-
string
$req: which version to compare
-
string
$relation: how to compare the version
Convert relation into corresponding code
integer
codeFromRelation
(string $relation, string $version, string $req, [bool $opt = false])
-
string
$relation: Relation
-
string
$version: Version
-
string
$req: Requirement
-
bool
$opt: Optional dependency indicator
Converts text comparing operators to them sign equivalents
Example: 'ge' to '>='
string
signOperator
(string $operator)
-
string
$operator: Operator