本文整理汇总了PHP中PEAR_Installer::_deletePackageFiles方法的典型用法代码示例。如果您正苦于以下问题:PHP PEAR_Installer::_deletePackageFiles方法的具体用法?PHP PEAR_Installer::_deletePackageFiles怎么用?PHP PEAR_Installer::_deletePackageFiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PEAR_Installer
的用法示例。
在下文中一共展示了PEAR_Installer::_deletePackageFiles方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
/**
* Delete a package's installed files, does not remove empty directories.
*
* @param string package name
* @param string channel name
* @param bool if true, then files are backed up first
* @return bool TRUE on success, or a PEAR error on failure
* @access protected
*/
function _deletePackageFiles($package, $channel = false, $backup = false)
{
if (!$channel) {
$channel = 'pear.php.net';
}
if (!strlen($package)) {
return $this->raiseError("No package to uninstall given");
}
if (strtolower($package) == 'pear' && $channel == 'pear.php.net') {
// to avoid race conditions, include all possible needed files
require_once 'PEAR/Task/Common.php';
require_once 'PEAR/Task/Replace.php';
require_once 'PEAR/Task/Unixeol.php';
require_once 'PEAR/Task/Windowseol.php';
require_once 'PEAR/PackageFile/v1.php';
require_once 'PEAR/PackageFile/v2.php';
require_once 'PEAR/PackageFile/Generator/v1.php';
require_once 'PEAR/PackageFile/Generator/v2.php';
}
$filelist = $this->_registry->packageInfo($package, 'filelist', $channel);
if ($filelist == null) {
return $this->raiseError("{$channel}/{$package} not installed");
}
$ret = array();
if ($this->config->isDefinedLayer('ftp') && isset($this->_options['upgrade'])) {
$pkg = $this->_registry->getPackage($package, $channel);
$this->ftpUninstall($pkg);
// no error checking
}
return parent::_deletePackageFiles($package, $channel, $backup);
}