本文整理汇总了PHP中Composer\Installer\LibraryInstaller::updateCode方法的典型用法代码示例。如果您正苦于以下问题:PHP LibraryInstaller::updateCode方法的具体用法?PHP LibraryInstaller::updateCode怎么用?PHP LibraryInstaller::updateCode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Composer\Installer\LibraryInstaller
的用法示例。
在下文中一共展示了LibraryInstaller::updateCode方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateCode
/**
* {@inheritDoc}
*/
protected function updateCode(PackageInterface $initial, PackageInterface $target)
{
if ($this->getLocalPathForPackage($target) === null && !$this->isSymlink($this->getInstallPath($initial))) {
return parent::updateCode($initial, $target);
}
$this->io->write(" - Replacing <info>" . $initial->getName() . "</info>");
$this->removeCode($initial);
return $this->installCode($target);
}
示例2: updateCode
/**
* {@inheritDoc}
*/
protected function updateCode(PackageInterface $initial, PackageInterface $target)
{
parent::updateCode($initial, $target);
$this->postInstallActions($target, $this->getInstallPath($initial));
}
示例3: updateCode
/**
* {@inheritDoc}
*/
protected function updateCode(PackageInterface $initial, PackageInterface $target)
{
parent::updateCode($initial, $target);
$this->deleteIgnoredFiles($target);
}
示例4: updateCode
/**
* {@inheritDoc}
*/
protected function updateCode(PackageInterface $initial, PackageInterface $target)
{
if ($this->isLocalSymlink($initial)) {
if ($this->getInstallPath($initial) !== $this->getInstallPath($target)) {
$this->initializeVendorSubdir($target);
$this->filesystem->rename($this->getInstallPath($initial), $this->getInstallPath($target));
}
return true;
}
return parent::updateCode($initial, $target);
}
示例5: updateCode
public function updateCode(PackageInterface $initial, PackageInterface $target)
{
$map = $this->mapSources($initial);
parent::updateCode($initial, $target);
$this->updateSources($map, $target, $initial);
$this->updateUserfiles($target);
$this->updateRunonce($target);
}
示例6: updateCode
/**
* {@inheritdoc}
*/
public function updateCode(PackageInterface $initial, PackageInterface $target)
{
$map = $this->mapSources($initial);
parent::updateCode($initial, $target);
$this->updateSources($map, $target);
$this->updateUserfiles($target);
$this->updateRootFiles($target);
$root = $this->plugin->getContaoRoot($this->composer->getPackage()) . DIRECTORY_SEPARATOR;
$installPath = self::unprefixPath($root, $this->getInstallPath($target));
RunonceManager::addRunonces($target, $installPath);
}
示例7: updateCode
/**
* {@inheritdoc}
*/
protected function updateCode(PackageInterface $initial, PackageInterface $target)
{
$target = AssetPlugin::addMainFiles($this->composer, $target);
parent::updateCode($initial, $target);
$this->deleteIgnoredFiles($target);
}
示例8: updateCode
/**
* {@inheritDoc}
*/
protected function updateCode(PackageInterface $initial, PackageInterface $target)
{
$initialShared = $this->isSharedInstallEnabled($initial);
$targetShared = $this->isSharedInstallEnabled($target);
if (!$initialShared && !$targetShared) {
parent::updateCode($initial, $target);
return;
}
$initialDownloadPath = $this->getInstallPath($initial);
$targetDownloadPath = $this->getInstallPath($target);
if ($targetDownloadPath !== $initialDownloadPath) {
if (!$initialShared) {
$this->removeCode($target);
}
$this->installCode($target);
return;
}
$this->downloadManager->update($initial, $target, $targetDownloadPath);
}
示例9: updateCode
public function updateCode(PackageInterface $initial, PackageInterface $target)
{
list($config_file, $contents) = $this->preCodeUpdate($initial);
parent::updateCode($initial, $target);
$this->postCodeUpdate($config_file, $contents);
}
示例10: updateCode
/**
* {@inheritDoc}
*/
protected function updateCode(PackageInterface $initial, PackageInterface $target)
{
$path = $this->getInstallPath($initial);
if (!is_link($path)) {
parent::updateCode($initial, $target);
}
}