PHP Class MagentoHackathon\Composer\Magento\Plugin

Inheritance: implements Composer\Plugin\PluginInterface, implements Composer\EventDispatcher\EventSubscriberInterface
显示文件 Open project: magento/magento-composer-installer

Protected Properties

Property Type Description
$composer Composer\Composer
$config MagentoHackathon\Composer\Magento\ProjectConfig
$deployManager MagentoHackathon\Composer\Magento\DeployManager
$filesystem Composer\Util\Filesystem
$io Composer\IO\IOInterface

Public Methods

Method Description
activate ( Composer\Composer $composer, Composer\IO\IOInterface $io )
getSubscribedEvents ( )
onCommandEvent ( Composer\Plugin\CommandEvent $event ) actually is triggered before anything got executed
onNewCodeEvent ( Composer\Script\Event $event ) event listener is named this way, as it listens for events leading to changed code files
onPackageUnistall ( Composer\Installer\PackageEvent $event )

Protected Methods

Method Description
copyRecursive ( string $source, string $target ) Copy then delete is a non-atomic version of {@link rename}.
deployLibraries ( )
initDeployManager ( Composer\Composer $composer, Composer\IO\IOInterface $io )

Private Methods

Method Description
requestRegeneration ( ) : void Force regeneration of var/di, var/cache, var/generation on next object manager invocation
saveVendorDirPath ( Composer\Composer $composer ) Generate file with path to Composer 'vendor' dir to be used by the application
setFilePermissions ( ) : void Set permissions for files using extra->chmod from composer.json

Method Details

activate() public method

public activate ( Composer\Composer $composer, Composer\IO\IOInterface $io )
$composer Composer\Composer
$io Composer\IO\IOInterface

copyRecursive() protected method

Some systems can't rename and also don't have proc_open, which requires this solution. copied from \Composer\Util\Filesystem::copyThenRemove and removed the remove part
protected copyRecursive ( string $source, string $target )
$source string
$target string

deployLibraries() protected method

protected deployLibraries ( )

getSubscribedEvents() public static method

public static getSubscribedEvents ( )

initDeployManager() protected method

protected initDeployManager ( Composer\Composer $composer, Composer\IO\IOInterface $io )
$composer Composer\Composer
$io Composer\IO\IOInterface

onCommandEvent() public method

actually is triggered before anything got executed
public onCommandEvent ( Composer\Plugin\CommandEvent $event )
$event Composer\Plugin\CommandEvent

onNewCodeEvent() public method

event listener is named this way, as it listens for events leading to changed code files
public onNewCodeEvent ( Composer\Script\Event $event )
$event Composer\Script\Event

onPackageUnistall() public method

public onPackageUnistall ( Composer\Installer\PackageEvent $event )
$event Composer\Installer\PackageEvent

Property Details

$composer protected_oe property

protected Composer,Composer $composer
return Composer\Composer

$config protected_oe property

protected ProjectConfig,MagentoHackathon\Composer\Magento $config
return MagentoHackathon\Composer\Magento\ProjectConfig

$deployManager protected_oe property

protected DeployManager,MagentoHackathon\Composer\Magento $deployManager
return MagentoHackathon\Composer\Magento\DeployManager

$filesystem protected_oe property

protected Filesystem,Composer\Util $filesystem
return Composer\Util\Filesystem

$io protected_oe property

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