PHP Class PHPComposter\PHPComposter\Plugin

This main class activates and sets up the PHP Composter system within the package's .git folder.
Since: 0.1.0
Author: Alain Schlesser ([email protected])
Inheritance: implements Composer\Plugin\PluginInterface, implements Composer\EventDispatcher\EventSubscriberInterface
Afficher le fichier Open project: php-composter/php-composter

Protected Properties

Свойство Type Description
$io Composer\IO\IOInterface Instance of the IO interface.

Méthodes publiques

Méthode Description
activate ( Composer\Composer $composer, Composer\IO\IOInterface $io ) Activate the Composer plugin.
getConfig ( ) : string Generate the config file.
getSubscribedEvents ( ) : string>\array Get the event subscriber configuration for this plugin.
persistConfig ( Composer\Script\Event $event ) Persist the stored configuration.

Méthodes protégées

Méthode Description
cleanUp ( Composer\Util\Filesystem $filesystem ) Clean up previous installation.
createGitHooks ( Composer\Util\Filesystem $filesystem ) Symlink each known Git hook to the PHP Composter bootstrapping script.
getGitHookNames ( ) : array Get an array with all known Git hooks.
linkBootstrapFiles ( Composer\Util\Filesystem $filesystem ) Symlink the bootstrapping code into the .git folder.

Method Details

activate() public méthode

Activate the Composer plugin.
Since: 0.1.0
public activate ( Composer\Composer $composer, Composer\IO\IOInterface $io )
$composer Composer\Composer Reference to the Composer instance.
$io Composer\IO\IOInterface Reference to the IO interface.

cleanUp() protected méthode

Clean up previous installation.
Since: 0.1.0
protected cleanUp ( Composer\Util\Filesystem $filesystem )
$filesystem Composer\Util\Filesystem Reference to the Filesystem instance.

createGitHooks() protected méthode

Symlink each known Git hook to the PHP Composter bootstrapping script.
Since: 0.1.0
protected createGitHooks ( Composer\Util\Filesystem $filesystem )
$filesystem Composer\Util\Filesystem Reference to the Filesystem instance.

getConfig() public static méthode

Generate the config file.
Since: 0.1.0
public static getConfig ( ) : string
Résultat string Generated Config file.

getGitHookNames() protected static méthode

Get an array with all known Git hooks.
Since: 0.1.0
protected static getGitHookNames ( ) : array
Résultat array Array of strings.

getSubscribedEvents() public static méthode

Get the event subscriber configuration for this plugin.
public static getSubscribedEvents ( ) : string>\array
Résultat string>\array

linkBootstrapFiles() protected méthode

Symlink the bootstrapping code into the .git folder.
Since: 0.1.0
protected linkBootstrapFiles ( Composer\Util\Filesystem $filesystem )
$filesystem Composer\Util\Filesystem Reference to the Filesystem instance.

persistConfig() public static méthode

Persist the stored configuration.
Since: 0.1.0
public static persistConfig ( Composer\Script\Event $event )
$event Composer\Script\Event Event that was triggered.

Property Details

$io protected_oe static_oe property

Instance of the IO interface.
Since: 0.1.0
protected static IOInterface,Composer\IO $io
Résultat Composer\IO\IOInterface