Plugin.php in Database Sanitize 7
File
vendor/edisonlabs/merge-yaml/src/Plugin.php
View source
<?php
namespace EdisonLabs\MergeYaml;
use Composer\Composer;
use Composer\EventDispatcher\EventSubscriberInterface;
use Composer\IO\IOInterface;
use Composer\Plugin\Capable;
use Composer\Plugin\PluginInterface;
use Composer\Script\Event;
use Composer\Script\ScriptEvents;
class Plugin implements PluginInterface, EventSubscriberInterface, Capable {
protected $pluginHandler;
public function activate(Composer $composer, IOInterface $io) {
$this->pluginHandler = new PluginHandler($composer, $io);
}
public function getCapabilities() {
return array(
'Composer\\Plugin\\Capability\\CommandProvider' => 'EdisonLabs\\MergeYaml\\CommandProvider',
);
}
public static function getSubscribedEvents() {
return array(
ScriptEvents::POST_INSTALL_CMD => array(
'postCmd',
-1,
),
ScriptEvents::POST_UPDATE_CMD => array(
'postCmd',
-1,
),
);
}
public function postCmd(Event $event) {
$this->pluginHandler
->createMergeFiles();
}
public function getPluginHandler() {
return $this->pluginHandler;
}
}
Classes
Name |
Description |
Plugin |
Composer plugin to merge yaml files. |