PHP Class Bolt\Composer\Action\RequirePackage

Author: Gawain Lynch ([email protected])
Inheritance: extends Bolt\Composer\Action\BaseAction
ファイルを表示 Open project: bolt/bolt Class Usage Examples

Public Methods

Method Description
execute ( array $package ) : integer Require (install) a package.

Private Methods

Method Description
updateComposerJson ( Bolt\Filesystem\Handler\JsonFile $jsonFile, array $package, boolean $isPostInstall ) Update the JSON file.
updateFileCleanly ( Bolt\Filesystem\Handler\JsonFile $jsonFile, array $new, string $requireKey, string $removeKey, boolean $sortPackages, boolean $isPostInstall ) : boolean Cleanly update a Composer JSON file.

Method Details

execute() public method

Require (install) a package.
public execute ( array $package ) : integer
$package array Package names and version to require - Format: ['name' => '', 'version' => '']
return integer 0 on success or a positive error code on failure