PEAR_PackageFileManager::addGlobalReplacement()

PEAR_PackageFileManager::addGlobalReplacement() -- Add a replacement option for all files

Synopsis

require_once 'PEAR/PackageFileManager.php';

void PEAR_PackageFileManager::addglobalreplacement (string $type, string $from, string $to)

Description

This sets an install-time complex search-and-replace function allowing the setting of platform-specific variables in all installed files.

if $type is php-const, then $to must be the name of a PHP Constant. If $type is pear-config, then $to must be the name of a PEAR config variable accessible through a PEAR_Config::get() method. If type is package-info, then $to must be the name of a section from the package.xml file used to install this file.

Paramètres

chaîne de caractères $type

variable type, either php-const, pear-config or package-info

chaîne de caractères $from

text to replace in the source file

chaîne de caractères $to

variable name to use for replacement

Valeurs renvoyées

throws PEAR_PACKAGEFILEMANAGER_INVALID_REPLACETYPE

Note

Cette fonction ne peut pas être appelée de façon statique.