$ composer ______ / ____/___ ____ ___ ____ ____ ________ _____ / / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/ / /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ / \____/\____/_/ /_/ /_/ .___/\____/____/\___/_/ /_/ Composer version 1.1.2 2016-05-31 19:48:11 Usage: command [options] [arguments] Options: -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --profile Display timing and memory usage information --no-plugins Whether to disable plugins. -d, --working-dir=WORKING-DIR If specified, use the given directory as working directory. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
namespace My; use Composer\Composer; use Composer\IO\IOInterface; use Composer\Plugin\PluginInterface; use Composer\EventDispatcher\EventSubscriberInterface; use Composer\EventDispatcher\Event; class Plugin implements PluginInterface, EventSubscriberInterface { private $composer; private $io; public function activate(Composer $composer, IOInterface $io) { $this->composer = $composer; $this->io = $io; } public static function getSubscribedEvents() { return array( 'post-autoload-dump' => 'onPostAutoloadDump', ); } public function onPostAutoloadDump(Event $ev) { $this->io->write('onPostAutoloadDump'); } } Πϕϯτϋϯυϥܕ ΠϯλʔϑΣʔεΛҰͭՃ ϑοΫ͢ΔΠϕϯτΛྻڍ ࣮ߦ͞ΕΔॲཧͷຊମ
namespace My; use Composer\Plugin\Capability\CommandProvider; class Commands implements CommandProvider { public function getCommands() { return array( new HelloCommand ); } } αϒίϚϯυܕ(2) ྻͰίϚϯυΛ ྻڍ