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

Class: PEAR_Dependency

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

Class Overview


Dependency check for PEAR packages


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 48]
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 58]

void PEAR_Dependency( object Registry &$registry)

Constructor
  • Access: public

Parameters:

object Registry   &$registry   —  object

[ Top ]

callCheckMethod   [line 85]

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 247]

mixed checkExtension( &$errmsg, string $name, [ $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
   &$errmsg   — 
   $req   — 

[ Top ]

checkOS   [line 303]

mixed checkOS( &$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
   &$errmsg   — 

[ Top ]

checkPackage   [line 136]

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

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
string   $channel   —  Channel name
   &$errmsg   — 

[ Top ]

checkPackageUninstall   [line 201]

bool checkPackageUninstall( &$error, &$warning, $package, [string $channel = 'pear.php.net'], string $error, string $warning, 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
string   $channel   —  Channel name of the package
   &$error   — 
   &$warning   — 
   $package   — 

[ Top ]

checkPHP   [line 330]

mixed checkPHP( &$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
   &$errmsg   — 

[ Top ]

checkProgram   [line 364]

mixed checkProgram( &$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
   &$errmsg   — 

[ Top ]

checkSAPI   [line 392]

mixed checkSAPI( &$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')
   &$errmsg   — 

[ Top ]

checkZend   [line 418]

mixed checkZend( &$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
   &$errmsg   — 

[ Top ]

codeFromRelation   [line 472]

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 445]

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 Mon, 11 Mar 2019 15:21:48 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.