www.easybib.com
[email protected]
Composer Plugins
namespace till\Composer;
use Composer\Composer, Composer\IO\IOInterface,
Composer\Plugin\PluginInterface, Composer\Plugin\PluginEvents,
Composer\Plugin\CommandEvent;
class ExamplePlugin implements PluginInterface
{
protected $c, $io;
public function activate(Composer $c, IOInterface $io) {
$this->c = $c; $this->io = $io;
}
public static function getSubcribedEvents() {
return array(PluginEvents::COMMAND => array(array(‘onCommand’, 0)));
}
public function onCommand(CommandEvent $e) {
/* ... */
}
}