本文整理汇总了PHP中PackageManager::get方法的典型用法代码示例。如果您正苦于以下问题:PHP PackageManager::get方法的具体用法?PHP PackageManager::get怎么用?PHP PackageManager::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PackageManager
的用法示例。
在下文中一共展示了PackageManager::get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cmdUnlock
/**
* Снимает блокировку системы.
*
*/
function cmdUnlock()
{
IO::out('Unlocking Package Manager', false);
if (PackageManager::get()->unlock(true)) {
io::done();
}
}
示例2: uninstall
/**
* Удаление пакета
*/
static function uninstall($package)
{
$nvr = PackageManager::parseNRV($package);
// проверка обратных зависимостей
$res = Deps::isNoNeeded($nvr, $unstatisfied);
if (count($res) == 0) {
return IO::out('Packages to uninstall not found', IO::MESSAGE_FAIL);
}
if ($res === false) {
io::out('Unable uninstall package ~WHITE~' . $nvr['name'] . '~~~ because', IO::MESSAGE_FAIL);
foreach ($unstatisfied as $p => $d) {
io::out('Package ' . $p . ' require ' . implode(', ', array_keys($d)));
}
return false;
}
io::out('Packages to be removed: ', false);
foreach ($res as $p) {
io::out($p->name . '(' . $p->version . ') ', false);
}
io::out();
if (IO::NO == io::dialog('Continue?', IO::YES | IO::NO, IO::NO)) {
return 1;
}
foreach ($res as $p) {
io::out('~WHITE~Undeploying ' . $p->name . '(' . $p->version . '):~~~');
$r = Deployer::undeploy(Deployer::getPackageRollbackDir($p));
if ($r || IO::OK != IO::dialog('Some part of rollback failed. Remove anyway?', IO::YES | IO::NO, IO::YES)) {
Deployer::getPackageRollbackDir($p)->delete();
$p->file->delete();
PackageManager::get()->packagesSequence->removePackage($p->name, $p->version);
}
}
}