1<?php 2 3/* 4 * This file is part of Component Installer. 5 * 6 * (c) Rob Loach (http://robloach.net) 7 * 8 * For the full copyright and license information, please view the LICENSE.md 9 * file that was distributed with this source code. 10 */ 11 12namespace ComponentInstaller; 13 14use Composer\Composer; 15use Composer\IO\IOInterface; 16use Composer\Plugin\PluginInterface; 17 18/** 19 * Composer Plugin to install Components. 20 * 21 * Adds the ComponentInstaller Plugin to the Composer instance. 22 * 23 * @see ComponentInstaller\Installer 24 */ 25class ComponentInstallerPlugin implements PluginInterface 26{ 27 /** 28 * Called when the plugin is activated. 29 */ 30 public function activate(Composer $composer, IOInterface $io) 31 { 32 $installer = new Installer($io, $composer); 33 $composer->getInstallationManager()->addInstaller($installer); 34 } 35} 36