Class yii\composer\Installer
Inheritance | yii\composer\Installer » Composer\Installer\LibraryInstaller |
---|---|
Available since version | 2.0 |
Public Methods
隐藏继承的方法 Hide inherited 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
隐藏继承的方法 Hide inherited 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
隐藏继承的常量 Hide inherited 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 |