Register commands from config file

extensions:
commands:
- Project\Command\MyCustomCommand
506278
public function registerCustomCommands()
    {
        try {
            $this->readCustomCommandsFromConfig();
        } catch (ConfigurationException $e) {
            if ($e->getCode() === 404) {
                return;
            }
            $this->renderException($e, new ConsoleOutput());
            exit(1);
        } catch (\Exception $e) {
            $this->renderException($e, new ConsoleOutput());
            exit(1);
        }
    }
1209056
protected function regsiterCommands()
    {

        $this->app['command.xmlconf.warmup'] = $this->app->share(

            function ($app)
            {
                return new Console\XmlConfWarmupCommand($app, $app['config']->get('xmlconf::namespaces'));
            }

        );

        $this->commands(
            'command.xmlconf.warmup'
        );
    }
1288806
protected function registerSeedCommand()
    {
        $this->app->singleton('command.module.seed', function ($app) {
            return new \Caffeinated\Modules\Console\Commands\ModuleSeedCommand($app['modules']);
        });

        $this->commands('command.module.seed');
    }
1275974
protected function registerCommands()
    {
        if ($this->app->runningInConsole()) {
            $this->commands([
                ModulesCommand::class,
                ModelsCommand::class,
                EnumsCommand::class,
                RequestsCommand::class,
                MakeModuleCommand::class,
                VersionCommand::class
            ]);
        }
    }
259460
private function registerPackageMakeCommand()
    {
        $this->app->bindShared('command.make.package', function ($app)
        {
            return new PackageMakeCommand($app['files'], $app['packages']);
        });

        $this->commands('command.make.package');
    }
1229192
protected function registerMakeMailCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Generators\Commands\MailMakeCommand($app);
        });
    }
791720
protected function registerDocsCommand()
    {
        $this->app->singleton(Command\Docs::class, function ($app) {
            return new Command\Docs(
                $app['Dingo\Api\Routing\Router'],
                $app['Dingo\Blueprint\Blueprint'],
                $app['Dingo\Blueprint\Writer'],
                $this->config('name'),
                $this->config('version')
            );
        });

        $this->commands([Command\Docs::class]);
    }
906073
protected function registerDocsCommand()
    {
        $this->app->singleton(\Dingo\Api\Console\Command\Docs::class, function ($app) {
            return new Command\Docs(
                $app[\Dingo\Api\Routing\Router::class],
                $app[\Dingo\Blueprint\Blueprint::class],
                $app[\Dingo\Blueprint\Writer::class],
                $this->config('name'),
                $this->config('version')
            );
        });

        $this->commands([\Dingo\Api\Console\Command\Docs::class]);
    }
1007563
protected function registerMakeCommand()
    {
        $this->commands('modules.make');
        
        $bind_method = method_exists($this->app, 'bindShared') ? 'bindShared' : 'singleton';

        $this->app->{$bind_method}('modules.make', function ($app) {
            return new Console\ModuleMakeCommand($this->files);
        });
    }
338493
function callbackCommandRegister(\CharlotteDunois\Livia\Commands\Command $command) {
        foreach($this->settings as $guild => $settings) {
            if($guild !== 'global' && !$this->client->guilds->has($guild)) {
                continue;
            }
            
            $this->setupGuildCommand($guild, $command, $settings);
        }
    }
334091
protected function registerCommands()
    {
        $this->app->bind('command.log-reader.delete', 'Jackiedo\LogReader\Console\Commands\LogReaderDeleteCommand');
        $this->app->bind('command.log-reader.detail', 'Jackiedo\LogReader\Console\Commands\LogReaderDetailCommand');
        $this->app->bind('command.log-reader.file-list', 'Jackiedo\LogReader\Console\Commands\LogReaderFileListCommand');
        $this->app->bind('command.log-reader.get', 'Jackiedo\LogReader\Console\Commands\LogReaderGetCommand');
        $this->app->bind('command.log-reader.remove-file', 'Jackiedo\LogReader\Console\Commands\LogReaderRemoveFileCommand');

        $this->commands('command.log-reader.delete');
        $this->commands('command.log-reader.detail');
        $this->commands('command.log-reader.file-list');
        $this->commands('command.log-reader.get');
        $this->commands('command.log-reader.remove-file');
    }
68443
protected function registerCommands()
    {
        $this->app->singleton('command.settings.table', function ($app) {
            return new SettingsTableCommand($app['files'], $app['composer']);
        });

        $this->commands('command.settings.table');
    }
220401
protected function registerCustomCommands()
    {
        // Keep the core default commands to have the HelpCommand
        // which is used when using the --help option
        $defaultCommands = parent::getDefaultCommands();

        // Automatically register commands by scanning namespaces for a 'DroidPlugin' class.
        //print_r($this->autoLoader);
        $prefixes = $this->autoLoader->getPrefixesPsr4();

        foreach ($prefixes as $namespace => $paths) {
            $className = $namespace . 'DroidPlugin';
            if (class_exists($className)) {
                $plugin = new $className($this);
                $commands = $plugin->getCommands();
                foreach ($commands as $command) {
                    $this->add($command);
                }
            }
        }

        foreach ($this->all() as $command) {
            if (method_exists($command, 'setInventory')) {
                $command->setInventory($this->inventory);
            }
        }

        if ($this->hasProject()) {
            $runner = new TaskRunner(
                $this,
                $this->transformer,
                new LoggerFactory,
                new ExpressionLanguage,
                $this->buildLegacyTransformer()
            );
            $enabler = $this->configureHostEnabler();
            if (! $enabler) {
                # TODO output a warning about not being able to run remote cmds
            } else {
                $runner->setEnabler($enabler);
            }
            foreach ($this->getProject()->getTargets() as $target) {
                $command = new BaseTargetCommand;
                $command->setName($target->getName());
                $command->setDescription("Run target: " . $target->getName());
                $command->setTarget($target->getName());
                $command->setTaskRunner($runner);
                foreach ($target->getArguments() as $argument) {

                    $required = InputArgument::OPTIONAL;
                    if ($argument->getRequired()) {
                        $required = InputArgument::REQUIRED;
                    }

                    $command->addArgument(
                        $argument->getName(),
                        $required,
                        $argument->getDescription()
                    );
                }
                $this->add($command);
            }
        }
    }
826849
protected function registerCommand()
    {
        $this->app->singleton('orchestra.commands.optimize', function ($app) {
            return new OptimizeCommand($app->make('orchestra.optimize'));
        });

        $this->commands('orchestra.commands.optimize');
    }
829316
private function registerArtisanCommands() {
        $this->commands([
            \BackupManager\Laravel\Laravel55DbBackupCommand::class,
            \BackupManager\Laravel\Laravel55DbRestoreCommand::class,
            \BackupManager\Laravel\Laravel55DbListCommand::class,
        ]);
    }
1222032
public function registerCommands()
	{
		$this->app['foruminstallcommand'] = $this->app->share(function($app)
        {
            return new InstallCommand;
        });
		$this->commands('foruminstallcommand');
	}
983616
protected function registerCommands()
    {
        $this->app->singleton('migrate.entity', function ($app){

            $packagePath = $app['path.base'] . '/vendor';

            return new MigrateEntity($app['entity.creator'], $packagePath);
        });
    }