PHP Class Pagekit\Installer\Helper\Composer

Exibir arquivo Open project: pagekit/pagekit Class Usage Examples

Protected Properties

Property Type Description
$file string
$io Composer\IO\ConsoleIO
$output Symfony\Component\Console\Output\OutputInterface
$packages array

Public Methods

Method Description
__construct ( array $config, null $output = null )
install ( array $install, boolean $packagist = false, boolean $writeConfig = true, boolean $preferSource = false ) : boolean
isInstalled ( $name ) : boolean Checks if a package is installed by composer.
uninstall ( array | string $uninstall, boolean $writeConfig = true )

Protected Methods

Method Description
addPackages ( $packages ) : array
composerUpdate ( array | boolean $updates = false, array $refresh = [], boolean $packagist = false, boolean $preferSource = false ) : boolean Runs Composer Update command.
getComposer ( boolean $packagist = false ) : null Returns composer instance.
getIO ( ) : Pagekit\Installer\Helper\InstallerIO
memoryInBytes ( $value ) : integer Converts memory value from 'php.ini' into bytes.
readConfig ( ) : array Reads packages from package file.
removePackages ( $packages ) : array
writeConfig ( ) Writes changes to packages file.

Method Details

__construct() public method

public __construct ( array $config, null $output = null )
$config array
$output null

addPackages() protected method

protected addPackages ( $packages ) : array
$packages
return array

composerUpdate() protected method

Runs Composer Update command.
protected composerUpdate ( array | boolean $updates = false, array $refresh = [], boolean $packagist = false, boolean $preferSource = false ) : boolean
$updates array | boolean
$refresh array
$packagist boolean
$preferSource boolean
return boolean

getComposer() protected method

Returns composer instance.
protected getComposer ( boolean $packagist = false ) : null
$packagist boolean
return null

getIO() protected method

protected getIO ( ) : Pagekit\Installer\Helper\InstallerIO
return Pagekit\Installer\Helper\InstallerIO

install() public method

public install ( array $install, boolean $packagist = false, boolean $writeConfig = true, boolean $preferSource = false ) : boolean
$install array [name => version, name => version, ...]
$packagist boolean
$writeConfig boolean
$preferSource boolean
return boolean

isInstalled() public method

Checks if a package is installed by composer.
public isInstalled ( $name ) : boolean
$name
return boolean

memoryInBytes() protected method

Converts memory value from 'php.ini' into bytes.
protected memoryInBytes ( $value ) : integer
$value
return integer

readConfig() protected method

Reads packages from package file.
protected readConfig ( ) : array
return array

removePackages() protected method

protected removePackages ( $packages ) : array
$packages
return array

uninstall() public method

public uninstall ( array | string $uninstall, boolean $writeConfig = true )
$uninstall array | string [name, name, ...]
$writeConfig boolean

writeConfig() protected method

Writes changes to packages file.
protected writeConfig ( )

Property Details

$file protected_oe property

protected string $file
return string

$io protected_oe property

protected ConsoleIO,Composer\IO $io
return Composer\IO\ConsoleIO

$output protected_oe property

protected OutputInterface,Symfony\Component\Console\Output $output
return Symfony\Component\Console\Output\OutputInterface

$packages protected_oe property

protected array $packages
return array