LEtudiant\Composer\Installer\Config\SharedPackageInstallerConfig::setSymlinkBasePath PHP Метод

setSymlinkBasePath() защищенный Метод

This is useful for a Virtual Machine environment, where directories can be different on the host machine and the guest machine.
protected setSymlinkBasePath ( array $extraConfigs )
$extraConfigs array
    protected function setSymlinkBasePath(array $extraConfigs)
    {
        if (isset($extraConfigs[SharedPackageInstaller::PACKAGE_TYPE]['symlink-base-path'])) {
            $this->symlinkBasePath = $extraConfigs[SharedPackageInstaller::PACKAGE_TYPE]['symlink-base-path'];
            if (false !== getenv(static::ENV_PARAMETER_SYMLINK_BASE_PATH)) {
                $this->symlinkBasePath = getenv(static::ENV_PARAMETER_SYMLINK_BASE_PATH);
            }
            // Remove the ending slash if exists
            if ('/' === $this->symlinkBasePath[strlen($this->symlinkBasePath) - 1]) {
                $this->symlinkBasePath = substr($this->symlinkBasePath, 0, -1);
            }
        } elseif (0 < strpos($extraConfigs[SharedPackageInstaller::PACKAGE_TYPE]['vendor-dir'], '/')) {
            $this->symlinkBasePath = $extraConfigs[SharedPackageInstaller::PACKAGE_TYPE]['vendor-dir'];
        }
        // Up to the project root directory
        if (0 < strpos($this->symlinkBasePath, '/')) {
            $this->symlinkBasePath = '../../' . $this->symlinkBasePath;
        }
    }