Class yii\composer\Installer

Inheritanceyii\composer\Installer » Composer\Installer\LibraryInstaller
Available since version2.0
Source Code https://github.com/yiisoft/yii2-composer/blob/master/Installer.php

Public Methods

Hide inherited methods

MethodDescriptionDefined 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

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
EXTENSION_FILE 'yiisoft/extensions.php' yii\composer\Installer
EXTRA_BOOTSTRAP 'bootstrap' yii\composer\Installer

Method Details

addPackage() protected method

protected void addPackage ( \Composer\Package\PackageInterface $package )
$package
copyFiles() public static method (available since version 2.0.5)

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).

generateCookieValidationKey() public static method

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 ( )
generateDefaultAlias() protected method

protected void generateDefaultAlias ( \Composer\Package\PackageInterface $package )
$package
generateRandomString() protected static method

protected static void generateRandomString ( )
install() public method

public void install ( \Composer\Repository\InstalledRepositoryInterface $repo, \Composer\Package\PackageInterface $package )
$repo
$package
linkBaseYiiFiles() protected method

protected void linkBaseYiiFiles ( )
loadExtensions() protected method

protected void loadExtensions ( )
postCreateProject() public static method

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
postInstall() public static method (available since version 2.0.5)

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
removeBaseYiiFiles() protected method

protected void removeBaseYiiFiles ( )
removePackage() protected method

protected void removePackage ( \Composer\Package\PackageInterface $package )
$package
runCommands() protected static method (available since version 2.0.5)

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
saveExtensions() protected method

protected void saveExtensions ( array $extensions )
$extensions
setPermission() public static method

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)

supports() public method

public void supports ( $packageType )
$packageType
uninstall() public method

public void uninstall ( \Composer\Repository\InstalledRepositoryInterface $repo, \Composer\Package\PackageInterface $package )
$repo
$package
update() public method

public void update ( \Composer\Repository\InstalledRepositoryInterface $repo, \Composer\Package\PackageInterface $initial, \Composer\Package\PackageInterface $target )
$repo
$initial
$target