BitrixInstaller
extends BaseInstaller
in package
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 directorybitrix/components/<vendor>/<name>
. -
bitrix-d7-template
— copy the template to directorybitrix/templates/<vendor>_<name>
.
You can set custom path to directory with Bitrix kernel in composer.json
:
{
"extra": {
"bitrix-dir": "s1/bitrix"
}
}
Tags
Table of Contents
- $composer : mixed
- $io : mixed
- $locations : mixed
- $package : mixed
- $checkedDuplicates : array<string|int, mixed>
- __construct() : mixed
- Initializes base installer.
- getInstallPath() : string
- Return the install path based on package type.
- getLocations() : array<string, string>
- Gets the installer's locations
- inflectPackageVars() : array<string, string>
- For an installer to override to modify the vars per installer.
- checkDuplicates() : mixed
- Duplicates search packages.
- mapCustomInstallPaths() : string|false
- Search through a passed paths array for a custom install path.
- templatePath() : string
- Replace vars in a path
Properties
$composer
protected
mixed
$composer
$io
protected
mixed
$io
$locations
protected
mixed
$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}/',
)
$package
protected
mixed
$package
$checkedDuplicates
private
static array<string|int, mixed>
$checkedDuplicates
= array()
Storage for informations about duplicates at all the time of installation packages.
Methods
__construct()
Initializes base installer.
public
__construct([PackageInterface $package = null ][, Composer $composer = null ][, IOInterface $io = null ]) : mixed
Parameters
- $package : PackageInterface = null
- $composer : Composer = null
- $io : IOInterface = null
Return values
mixed —getInstallPath()
Return the install path based on package type.
public
getInstallPath(PackageInterface $package[, string $frameworkType = '' ]) : string
Parameters
- $package : PackageInterface
- $frameworkType : string = ''
Return values
string —getLocations()
Gets the installer's locations
public
getLocations() : array<string, string>
Return values
array<string, string> —map of package types => install path
inflectPackageVars()
For an installer to override to modify the vars per installer.
public
inflectPackageVars(mixed $vars) : array<string, string>
Parameters
- $vars : mixed
-
This will normally receive array{name: string, vendor: string, type: string}
Return values
array<string, string> —checkDuplicates()
Duplicates search packages.
protected
checkDuplicates(string $path[, array<string|int, mixed> $vars = array() ]) : mixed
Parameters
- $path : string
- $vars : array<string|int, mixed> = array()
Return values
mixed —mapCustomInstallPaths()
Search through a passed paths array for a custom install path.
protected
mapCustomInstallPaths(array<string|int, mixed> $paths, string $name, string $type[, string $vendor = NULL ]) : string|false
Parameters
- $paths : array<string|int, mixed>
- $name : string
- $type : string
- $vendor : string = NULL
-
= NULL
Return values
string|false —templatePath()
Replace vars in a path
protected
templatePath(mixed $path[, array<string|int, mixed> $vars = array() ]) : string
Parameters
- $path : mixed
- $vars : array<string|int, mixed> = array()