proxyBuilder = $proxy_builder; parent::__construct(); } /** * {@inheritdoc} */ protected function getCommandName(InputInterface $input) { return 'generate-proxy-class'; } /** * {@inheritdoc} */ protected function getDefaultCommands() { // Even though this is a single command, keep the HelpCommand (--help). $default_commands = parent::getDefaultCommands(); $default_commands[] = new GenerateProxyClassCommand($this->proxyBuilder); return $default_commands; } /** * {@inheritdoc} * * Overridden so the application doesn't expect the command name as the first * argument. */ public function getDefinition() { $definition = parent::getDefinition(); // Clears the normal first argument (the command name). $definition->setArguments(); return $definition; } }