PEAR_PackageFileManager::addDependency

PEAR_PackageFileManager::addDependency() – Add a dependency on another package, or an extension/php

Synopsis

require_once 'PEAR/PackageFileManager.php';

void|PEAR_Error PEAR_PackageFileManager::addDependency ( string $name , string $version = false , string $operator = 'ge' , string $type = 'pkg' , boolean $optional = false )

Description

This will overwrite an existing dependency if it is found. In other words, if a dependency on PHP 4.1.0 exists, and addDependency('php', '4.3.0', 'ge', 'php') is called, the existing dependency on PHP 4.1.0 will be overwritten with the new one on PHP 4.3.0

Parameter

string $name

Dependency element name

string $version

Dependency version

string $operator

A specific operator for the version, this can be one of: 'has', 'not', 'lt', 'le', 'eq', 'ne', 'ge', or 'gt'

string $type

Dependency type. This can be one of: 'pkg', 'ext', 'php', 'prog', 'os', 'sapi', or 'zend'

boolean $optional

TRUE if dependency is optional

Throws

throws PEAR_PACKAGEFILEMANAGER_RUN_SETOPTIONS

throws PEAR_PACKAGEFILEMANAGER_PHP_NOT_PACKAGE

Note

This function can not be called statically.

Add an install-time configuration option for building of source (Previous) Add a maintainer to the list of maintainers. (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.