本文整理匯總了PHP中Composer\Installer\LibraryInstaller::removeCode方法的典型用法代碼示例。如果您正苦於以下問題:PHP LibraryInstaller::removeCode方法的具體用法?PHP LibraryInstaller::removeCode怎麽用?PHP LibraryInstaller::removeCode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Composer\Installer\LibraryInstaller
的用法示例。
在下文中一共展示了LibraryInstaller::removeCode方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: removeCode
/**
* {@inheritDoc}
*/
protected function removeCode(PackageInterface $package)
{
$path = $this->getInstallPath($package);
if ($this->isSymlink($path)) {
$this->debug("Unlinking <comment>{$path}</comment>...");
$this->filesystem->unlink($path);
return true;
}
return parent::removeCode($package);
}
示例2: removeCode
/**
* {@inheritDoc}
*/
protected function removeCode(PackageInterface $package)
{
$publicPath = $this->getPublicPath();
$installPath = $this->getInstallPath($package);
if (is_link($installPath)) {
unlink($installPath);
} else {
parent::removeCode($package);
}
// remove symlink package public folder to keeko's public folder
$type = $package->getType();
if ($type !== 'keeko-core') {
$target = $this->filesystem->normalizePath($publicPath . '/' . $this->getPackageDir($type) . '/' . $package->getName());
if (is_link($target)) {
unlink($target);
}
// remove parent if empty
$parent = dirname($target);
if (file_exists($parent) && count(scandir($parent)) == 2) {
$this->filesystem->removeDirectoryPhp($parent);
}
}
}
示例3: removeCode
/**
* {@inheritDoc}
*/
protected function removeCode(PackageInterface $package)
{
parent::removeCode($package);
$this->removeLoader($package);
}
示例4: removeCode
/**
* {@inheritDoc}
*/
protected function removeCode(PackageInterface $package)
{
if ($this->isLocalSymlink($package)) {
$this->filesystem->unlink($this->getInstallPath($package));
return true;
}
return parent::removeCode($package);
}
示例5: removeCode
/**
* Remove both the installed code and files from the Component directory.
*
* @param PackageInterface $package
*/
public function removeCode(PackageInterface $package)
{
$this->removeComponent($package);
parent::removeCode($package);
}
示例6: removeCode
/**
* {@inheritDoc}
*/
protected function removeCode(PackageInterface $package)
{
if (!$this->isSharedInstallEnabled($package)) {
parent::removeCode($package);
return;
}
}
示例7: removeCode
/**
* Remove the code
*
* @param PackageInterface $package
* @return void
*/
public function removeCode(PackageInterface $package)
{
$this->initializeVendorDir();
$this->supportedByName($package->getPrettyName());
$this->setComponentPath();
if (is_dir($this->getComponentPath()) && basename($this->getComponentPath()) !== 'component') {
$this->filesystem->removeDirectory($this->getComponentPath());
} else {
$this->io->error($this->getComponentPath());
}
parent::removeCode($package);
}