PATH:
home
/
lab2454c
/
keebchat.com
/
core
/
libs
/
s3
/
vendor
/
composer
/
installers
/
src
/
Composer
/
Installers
<?php namespace Composer\Installers; use Composer\Util\Filesystem; /** * Installer for Bitrix Framework. Supported types of extensions: * - `bitrix-d7-module` — copy the module to directory `bitrix/modules/<vendor>.<name>`. * - `bitrix-d7-component` — copy the component to directory `bitrix/components/<vendor>/<name>`. * - `bitrix-d7-template` — copy the template to directory `bitrix/templates/<vendor>_<name>`. * * You can set custom path to directory with Bitrix kernel in `composer.json`: * * ```json * { * "extra": { * "bitrix-dir": "s1/bitrix" * } * } * ``` * * @author Nik Samokhvalov <nik@samokhvalov.info> * @author Denis Kulichkin <onexhovia@gmail.com> */ class BitrixInstaller extends BaseInstaller { protected $locations = array( 'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken) 'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken) 'theme' => '{$bitrix_dir}/templates/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken) 'd7-module' => '{$bitrix_dir}/modules/{$vendor}.{$name}/', 'd7-component' => '{$bitrix_dir}/components/{$vendor}/{$name}/', 'd7-template' => '{$bitrix_dir}/templates/{$vendor}_{$name}/', ); /** * @var array Storage for informations about duplicates at all the time of installation packages. */ private static $checkedDuplicates = array(); /** * {@inheritdoc} */ public function inflectPackageVars($vars) { if ($this->composer->getPackage()) { $extra = $this->composer->getPackage()->getExtra(); if (isset($extra['bitrix-dir'])) { $vars['bitrix_dir'] = $extra['bitrix-dir']; } } if (!isset($vars['bitrix_dir'])) { $vars['bitrix_dir'] = 'bitrix'; } return parent::inflectPackageVars($vars); } /** * {@inheritdoc} */ protected function templatePath($path, array $vars = array()) { $templatePath = parent::templatePath($path, $vars); $this->checkDuplicates($templatePath, $vars); return $templatePath; } /** * Duplicates search packages. * * @param string $path * @param array $vars */ protected function checkDuplicates($path, array $vars = array()) { $packageType = substr($vars['type'], strlen('bitrix') + 1); $localDir = explode('/', $vars['bitrix_dir']); array_pop($localDir); $localDir[] = 'local'; $localDir = implode('/', $localDir); $oldPath = str_replace( array('{$bitrix_dir}', '{$name}'), array($localDir, $vars['name']), $this->locations[$packageType] ); if (in_array($oldPath, static::$checkedDuplicates)) { return; } if ($oldPath !== $path && file_exists($oldPath) && $this->io && $this->io->isInteractive()) { $this->io->writeError(' <error>Duplication of packages:</error>'); $this->io->writeError(' <info>Package ' . $oldPath . ' will be called instead package ' . $path . '</info>'); while (true) { switch ($this->io->ask(' <info>Delete ' . $oldPath . ' [y,n,?]?</info> ', '?')) { case 'y': $fs = new Filesystem(); $fs->removeDirectory($oldPath); break 2; case 'n': break 2; case '?': default: $this->io->writeError(array( ' y - delete package ' . $oldPath . ' and to continue with the installation', ' n - don\'t delete and to continue with the installation', )); $this->io->writeError(' ? - print help'); break; } } } static::$checkedDuplicates[] = $oldPath; } }
[-] SyDESInstaller.php
[edit]
[-] Concrete5Installer.php
[edit]
[-] LaravelInstaller.php
[edit]
[-] MakoInstaller.php
[edit]
[-] MayaInstaller.php
[edit]
[-] LavaLiteInstaller.php
[edit]
[-] KodiCMSInstaller.php
[edit]
[-] PortoInstaller.php
[edit]
[-] GravInstaller.php
[edit]
[-] Plugin.php
[edit]
[-] TheliaInstaller.php
[edit]
[-] PPIInstaller.php
[edit]
[-] CraftInstaller.php
[edit]
[-] JoomlaInstaller.php
[edit]
[-] CroogoInstaller.php
[edit]
[-] Redaxo5Installer.php
[edit]
[-] WordPressInstaller.php
[edit]
[-] ModxInstaller.php
[edit]
[-] ExpressionEngineInstaller.php
[edit]
[+]
..
[-] TYPO3FlowInstaller.php
[edit]
[-] PuppetInstaller.php
[edit]
[-] ItopInstaller.php
[edit]
[-] SiteDirectInstaller.php
[edit]
[-] EliasisInstaller.php
[edit]
[-] EzPlatformInstaller.php
[edit]
[-] PhpBBInstaller.php
[edit]
[-] PlentymarketsInstaller.php
[edit]
[-] MauticInstaller.php
[edit]
[-] AnnotateCmsInstaller.php
[edit]
[-] Symfony1Installer.php
[edit]
[-] AttogramInstaller.php
[edit]
[-] YawikInstaller.php
[edit]
[-] PrestashopInstaller.php
[edit]
[-] MajimaInstaller.php
[edit]
[-] FuelInstaller.php
[edit]
[-] MediaWikiInstaller.php
[edit]
[-] VgmcpInstaller.php
[edit]
[-] FuelphpInstaller.php
[edit]
[-] BaseInstaller.php
[edit]
[-] KnownInstaller.php
[edit]
[-] ClanCatsFrameworkInstaller.php
[edit]
[-] DframeInstaller.php
[edit]
[-] RoundcubeInstaller.php
[edit]
[-] CockpitInstaller.php
[edit]
[-] CiviCrmInstaller.php
[edit]
[-] MoodleInstaller.php
[edit]
[-] SilverStripeInstaller.php
[edit]
[-] AsgardInstaller.php
[edit]
[-] TaoInstaller.php
[edit]
[-] ReIndexInstaller.php
[edit]
[-] OsclassInstaller.php
[edit]
[-] MODULEWorkInstaller.php
[edit]
[-] AimeosInstaller.php
[edit]
[-] WolfCMSInstaller.php
[edit]
[-] RadPHPInstaller.php
[edit]
[-] OctoberInstaller.php
[edit]
[-] CakePHPInstaller.php
[edit]
[-] SMFInstaller.php
[edit]
[-] LithiumInstaller.php
[edit]
[-] OntoWikiInstaller.php
[edit]
[-] DecibelInstaller.php
[edit]
[-] DokuWikiInstaller.php
[edit]
[-] RedaxoInstaller.php
[edit]
[-] ChefInstaller.php
[edit]
[-] Installer.php
[edit]
[-] DolibarrInstaller.php
[edit]
[-] WHMCSInstaller.php
[edit]
[-] VanillaInstaller.php
[edit]
[-] KanboardInstaller.php
[edit]
[-] ZikulaInstaller.php
[edit]
[-] PxcmsInstaller.php
[edit]
[-] KohanaInstaller.php
[edit]
[-] CodeIgniterInstaller.php
[edit]
[-] PhiftyInstaller.php
[edit]
[-] MagentoInstaller.php
[edit]
[-] DrupalInstaller.php
[edit]
[-] PimcoreInstaller.php
[edit]
[-] BitrixInstaller.php
[edit]
[-] BonefishInstaller.php
[edit]
[-] LanManagementSystemInstaller.php
[edit]
[-] AglInstaller.php
[edit]
[-] PiwikInstaller.php
[edit]
[-] KirbyInstaller.php
[edit]
[-] ShopwareInstaller.php
[edit]
[-] MODXEvoInstaller.php
[edit]
[-] ZendInstaller.php
[edit]
[-] TYPO3CmsInstaller.php
[edit]
[-] UserFrostingInstaller.php
[edit]
[-] ImageCMSInstaller.php
[edit]
[-] OxidInstaller.php
[edit]
[-] HuradInstaller.php
[edit]
[-] MicroweberInstaller.php
[edit]
[-] TuskInstaller.php
[edit]
[-] ElggInstaller.php
[edit]