class Plugin in Database Sanitize 7
Composer plugin to merge yaml files.
Hierarchy
- class \EdisonLabs\MergeYaml\Plugin implements \Composer\Plugin\PluginInterface, \Composer\EventDispatcher\EventSubscriberInterface, \Composer\Plugin\Capable
Expanded class hierarchy of Plugin
1 file declares its use of Plugin
- PluginTest.php in vendor/
edisonlabs/ merge-yaml/ tests/ src/ Unit/ PluginTest.php
File
- vendor/
edisonlabs/ merge-yaml/ src/ Plugin.php, line 16
Namespace
EdisonLabs\MergeYamlView source
class Plugin implements PluginInterface, EventSubscriberInterface, Capable {
/**
* The Plugin handler object.
*
* @var \EdisonLabs\MergeYaml\PluginHandler
*/
protected $pluginHandler;
/**
* {@inheritdoc}
*/
public function activate(Composer $composer, IOInterface $io) {
$this->pluginHandler = new PluginHandler($composer, $io);
}
/**
* {@inheritdoc}
*/
public function getCapabilities() {
return array(
'Composer\\Plugin\\Capability\\CommandProvider' => 'EdisonLabs\\MergeYaml\\CommandProvider',
);
}
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents() {
return array(
ScriptEvents::POST_INSTALL_CMD => array(
'postCmd',
-1,
),
ScriptEvents::POST_UPDATE_CMD => array(
'postCmd',
-1,
),
);
}
/**
* Post command event callback.
*
* @param \Composer\Script\Event $event
* Event object.
*/
public function postCmd(Event $event) {
$this->pluginHandler
->createMergeFiles();
}
/**
* Gets the plugin handler.
*
* @return \EdisonLabs\MergeYaml\PluginHandler
* The MergeYaml plugin handler.
*/
public function getPluginHandler() {
return $this->pluginHandler;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Plugin:: |
protected | property | The Plugin handler object. | |
Plugin:: |
public | function | ||
Plugin:: |
public | function | ||
Plugin:: |
public | function | Gets the plugin handler. | |
Plugin:: |
public static | function | ||
Plugin:: |
public | function | Post command event callback. |