本文整理汇总了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);
}