apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: PEAR_Dependency

Source Location: /PEAR-1.3.5/PEAR/Dependency.php

Class Overview


Dependency check for PEAR packages


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 43]
Dependency check for PEAR packages

The class is based on the dependency RFC that can be found at http://cvs.php.net/cvs.php/pearweb/rfc. It requires PHP >= 4.1



[ Top ]


Method Detail

PEAR_Dependency (Constructor)   [line 53]

void PEAR_Dependency( object Registry &$registry)

Constructor
  • Access: public

Parameters:

object Registry   &$registry     object

[ Top ]

callCheckMethod   [line 80]

boolean callCheckMethod( string &$errmsg, array $opts)

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
    )
 


Parameters:

string   &$errmsg     Error message
array   $opts     Options

[ Top ]

checkExtension   [line 234]

mixed checkExtension( mixed &$errmsg, string $name, [mixed $req = null], [string $relation = 'has'], [bool $opt = false], string $req_ext_ver)

Extension dependencies check method
  • Return: bool false if no error or the error string

Parameters:

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

[ Top ]

checkOS   [line 290]

mixed checkOS( mixed &$errmsg, string $os)

Operating system dependencies check method
  • Return: bool false if no error or the error string

Parameters:

string   $os     Name of the operating system

[ Top ]

checkPackage   [line 129]

mixed checkPackage( string &$errmsg, string $name, [string $req = null], [string $relation = 'has'], [bool $opt = false])

Package dependencies check method
  • Return: bool false if no error or the error string

Parameters:

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

[ Top ]

checkPackageUninstall   [line 193]

bool checkPackageUninstall( string &$error, string &$warning, mixed $package, string $name)

Check package dependencies on uninstall
  • Return: true if there were errors

Parameters:

string   $error     The resultant error string
string   $warning     The resultant warning string
string   $name     Name of the package to test

[ Top ]

checkPHP   [line 318]

mixed checkPHP( mixed &$errmsg, string $req, [string $relation = 'ge'])

PHP version check method
  • Return: bool false if no error or the error string

Parameters:

string   $req     which version to compare
string   $relation     how to compare the version

[ Top ]

checkProgram   [line 353]

mixed checkProgram( mixed &$errmsg, string $program)

External program check method. Looks for executable files in directories listed in the PATH environment variable.
  • Return: bool false if no error or the error string

Parameters:

string   $program     which program to look for

[ Top ]

checkSAPI   [line 381]

mixed checkSAPI( mixed &$errmsg, string $name, [string $req = null], [string $relation = 'has'])

SAPI backend check method. Version comparison is not yet available here.
  • Return: bool false if no error or the error string

Parameters:

string   $name     name of SAPI backend
string   $req     which version to compare
string   $relation     how to compare versions (currently hardcoded to 'has')

[ Top ]

checkZend   [line 407]

mixed checkZend( mixed &$errmsg, string $req, [string $relation = 'ge'])

Zend version check method
  • Return: bool false if no error or the error string

Parameters:

string   $req     which version to compare
string   $relation     how to compare the version

[ Top ]

codeFromRelation   [line 461]

integer codeFromRelation( string $relation, string $version, string $req, [bool $opt = false])

Convert relation into corresponding code
  • Access: public

Parameters:

string   $relation     Relation
string   $version     Version
string   $req     Requirement
bool   $opt     Optional dependency indicator

[ Top ]

signOperator   [line 434]

string signOperator( string $operator)

Converts text comparing operators to them sign equivalents

Example: 'ge' to '>='

  • Return: Sign equivalent
  • Access: public

Parameters:

string   $operator     Operator

[ Top ]


Documentation generated on Fri, 18 Feb 2005 00:40:36 -0500 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.