Class yii\composer\Installer
Inheritance | yii\composer\Installer » Composer\Installer\LibraryInstaller |
---|---|
Available since version | 2.0 |
Source Code | https://github.com/yiisoft/yii2-composer/blob/master/Installer.php |
Public Methods
Method | Description | Defined By |
---|---|---|
copyFiles() | Copy files to specified locations. | yii\composer\Installer |
generateCookieValidationKey() | Generates a cookie validation key for every app config listed in "config" in extra section. | yii\composer\Installer |
install() | yii\composer\Installer | |
postCreateProject() | Special method to run tasks defined in [extra][yii\composer\Installer::postCreateProject] key in composer.json |
yii\composer\Installer |
postInstall() | Special method to run tasks defined in [extra][yii\composer\Installer::postInstall] key in composer.json |
yii\composer\Installer |
setPermission() | Sets the correct permission for the files and directories listed in the extra section. | yii\composer\Installer |
supports() | yii\composer\Installer | |
uninstall() | yii\composer\Installer | |
update() | yii\composer\Installer |
Protected Methods
Method | Description | Defined By |
---|---|---|
addPackage() | yii\composer\Installer | |
generateDefaultAlias() | yii\composer\Installer | |
generateRandomString() | yii\composer\Installer | |
linkBaseYiiFiles() | yii\composer\Installer | |
loadExtensions() | yii\composer\Installer | |
removeBaseYiiFiles() | yii\composer\Installer | |
removePackage() | yii\composer\Installer | |
runCommands() | Special method to run tasks defined in [extra][$extraKey] key in composer.json |
yii\composer\Installer |
saveExtensions() | yii\composer\Installer |
Constants
Constant | Value | Description | Defined By |
---|---|---|---|
EXTENSION_FILE | 'yiisoft/extensions.php' | yii\composer\Installer | |
EXTRA_BOOTSTRAP | 'bootstrap' | yii\composer\Installer |
Method Details
protected void addPackage ( \Composer\Package\PackageInterface $package ) | ||
$package |
Copy files to specified locations.
public static void copyFiles ( array $paths ) | ||
$paths | array | The source files paths (keys) and the corresponding target locations for copied files (values). Location can be specified as an array - first element is target location, second defines whether file can be overwritten (by default method don't overwrite existing files). |
Generates a cookie validation key for every app config listed in "config" in extra section.
You can provide one or multiple parameters as the configuration files which need to have validation key inserted.
public static void generateCookieValidationKey ( ) |
protected void generateDefaultAlias ( \Composer\Package\PackageInterface $package ) | ||
$package |
protected static void generateRandomString ( ) |
public void install ( \Composer\Repository\InstalledRepositoryInterface $repo, \Composer\Package\PackageInterface $package ) | ||
$repo | ||
$package |
protected void linkBaseYiiFiles ( ) |
protected void loadExtensions ( ) |
Special method to run tasks defined in [extra][yii\composer\Installer::postCreateProject]
key in composer.json
public static void postCreateProject ( $event ) | ||
$event | \Composer\Script\Event |
Special method to run tasks defined in [extra][yii\composer\Installer::postInstall]
key in composer.json
public static void postInstall ( $event ) | ||
$event | \Composer\Script\Event |
protected void removeBaseYiiFiles ( ) |
protected void removePackage ( \Composer\Package\PackageInterface $package ) | ||
$package |
Special method to run tasks defined in [extra][$extraKey]
key in composer.json
protected static void runCommands ( $event, $extraKey ) | ||
$event | \Composer\Script\Event | |
$extraKey | string |
protected void saveExtensions ( array $extensions ) | ||
$extensions |
Sets the correct permission for the files and directories listed in the extra section.
public static void setPermission ( array $paths ) | ||
$paths | array | The paths (keys) and the corresponding permission octal strings (values) |
public void supports ( $packageType ) | ||
$packageType |
public void uninstall ( \Composer\Repository\InstalledRepositoryInterface $repo, \Composer\Package\PackageInterface $package ) | ||
$repo | ||
$package |
public void update ( \Composer\Repository\InstalledRepositoryInterface $repo, \Composer\Package\PackageInterface $initial, \Composer\Package\PackageInterface $target ) | ||
$repo | ||
$initial | ||
$target |