PHP Class PHPComposter\PHPComposter\Plugin
This main class activates and sets up the PHP Composter system within the package's .git folder.
Datei anzeigen
Open project: php-composter/php-composter
Protected Properties
Property |
Type |
Description |
|
$io |
Composer\IO\IOInterface |
Instance of the IO interface. |
|
Public Methods
Method |
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. |
|
Protected Methods
Method |
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 the Composer plugin.
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 method
Clean up previous installation.
protected cleanUp ( Composer\Util\Filesystem $filesystem ) |
$filesystem |
Composer\Util\Filesystem |
Reference to the Filesystem instance. |
createGitHooks()
protected method
Symlink each known Git hook to the PHP Composter bootstrapping script.
protected createGitHooks ( Composer\Util\Filesystem $filesystem ) |
$filesystem |
Composer\Util\Filesystem |
Reference to the Filesystem instance. |
getConfig()
public static method
Generate the config file.
getGitHookNames()
protected static method
Get an array with all known Git hooks.
getSubscribedEvents()
public static method
Get the event subscriber configuration for this plugin.
linkBootstrapFiles()
protected method
Symlink the bootstrapping code into the .git folder.
protected linkBootstrapFiles ( Composer\Util\Filesystem $filesystem ) |
$filesystem |
Composer\Util\Filesystem |
Reference to the Filesystem instance. |
persistConfig()
public static method
Persist the stored configuration.
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.
protected static IOInterface,Composer\IO $io |
return |
Composer\IO\IOInterface |
|