Search custom commands and register them.

@throws ConfigurationException
181019
protected function readCustomCommandsFromConfig()
    {
        $this->getCoreArguments(); // Maybe load outside configfile

        $config = Configuration::config();

        if (empty($config['extensions']['commands'])) {
            return;
        }

        foreach ($config['extensions']['commands'] as $commandClass) {
            $commandName = $this->getCustomCommandName($commandClass);
            $this->add(new $commandClass($commandName));
        }
    }
817597
protected function initialize() : void
    {
        $driver = $this->config->getMetadataDriverImpl();
        if ($driver === null) {
            throw ConfigurationException::noMetadataDriverConfigured();
        }

        $this->driver      = $driver;
        $this->evm         = $this->dm->getEventManager();
        $this->initialized = true;
    }
210531
public function registerCommands()
	{
		$this->app->bindShared('command.cache.clear', function($app)
		{
			return new Console\ClearCommand($app['cache'], $app['files']);
		});

		$this->commands('command.cache.clear');
	}
1135024
private function registerProviderMakeCommand()
    {
        $this->app->bindShared('command.make.package.provider', function ($app)
        {
            return new ProviderMakeCommand($app['files'], $app['packages']);
        });

        $this->commands('command.make.package.provider');
    }
826849
protected function registerCommand()
    {
        $this->app->singleton('orchestra.commands.optimize', function ($app) {
            return new OptimizeCommand($app->make('orchestra.optimize'));
        });

        $this->commands('orchestra.commands.optimize');
    }
160182
protected function registerConfigPublishCommand(): void
    {
        $this->app->singleton('command.config.publish', function (Application $app) {
            return new ConfigPublishCommand($app->make('config.publisher'));
        });
    }
859771
protected function registerCommands()
    {
        $this->app->singleton('command.vueg.component', function ($app) {
            return $app[MakeComponent::class];
        });

        $this->app->singleton('command.vueg.mixin', function ($app) {
            return $app[MakeMixin::class];
        });

        $this->commands('command.vueg.component');

        $this->commands('command.vueg.mixin');
    }
317922
public function register()
    {
        foreach ($this->commands as $binding => $command) {
            $bind    = $this->prefix . $binding;
            $command = '\\' . $this->namespace . '\\' . $command . $this->commandSuffix;
            unset($this->commands[ $binding ]);
            $this->commands[ $bind ] = $command;
            $this->app->singleton($bind, $command);
        }

        $this->commands(array_keys($this->commands));
    }
1237228
private function registerCommands()
    {
        $this->commands([
            Console\Commands\SeedCountries::class,
            Console\Commands\SeedCurrencies::class,
            Console\Commands\SeedTimezones::class,
            Console\Commands\SeedTaxRates::class,
        ]);
    }
379273
protected function registerScanCommand() {
		
		$this->commands('permacon.scan');
		$bind_method = method_exists($this->app, 'bindShared') ? 'bindShared' : 'singleton';
		$this->app->{$bind_method}('permacon.scan', function($app) {
			return new Console\PermaconScanCommand($this->files);
		});
	}
142912
protected function registerConfig() {
        $config = new Configuration($this->configFile);
        $this->container->set('config', function() use ($config) {
                return $config;
        });
    }
1222032
public function registerCommands()
	{
		$this->app['foruminstallcommand'] = $this->app->share(function($app)
        {
            return new InstallCommand;
        });
		$this->commands('foruminstallcommand');
	}
262607
protected function registerConsoleCommands()
    {
        $this->commands([
            InfoCommand::class,
            SchemaCreateCommand::class,
            SchemaUpdateCommand::class,
            SchemaDropCommand::class,
            SchemaValidateCommand::class,
            ClearMetadataCacheCommand::class,
            ClearResultCacheCommand::class,
            ClearQueryCacheCommand::class,
            EnsureProductionSettingsCommand::class,
            GenerateProxiesCommand::class,
            ConvertConfigCommand::class,
            MappingImportCommand::class,
            GenerateEntitiesCommand::class,
            GenerateRepositoriesCommand::class,
            ConvertMappingCommand::class,
            DumpDatabaseCommand::class
        ]);
    }
579412
protected function registerMakeCommand()
    {
        $this->app->singleton('pluggables.make', function ($app) {
            $handler = new Handlers\PluggableMakeHandler($app['pluggables'], $app['files']);

            return new Console\PluggableMakeCommand($handler);
        });
    }
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);
        });
    }
1360149
public function register()
    {
        $errorMsg = "Your ConsoleServiceProvider(AbstractConsoleProvider) requires property";
        if (! isset($this->namespace) or ! is_string($this->namespace)) {
            throw new ErrorException("$errorMsg \$namespace to be an string");
        }
        if (! isset($this->commands) or ! is_array($this->commands)) {
            throw new ErrorException("$errorMsg \$commands to be an array");
        }

        $bindings = [ ];
        foreach ($this->commands as $binding => $command) {
            $binding    = $this->prefix . $binding;
            $bindings[] = $binding;
            $this->{"registerCommand"}($binding, $command);
        }

        $this->commands($bindings);
    }
464192
public function run(InputInterface $input = null, OutputInterface $output = null)
    {
        if ($input === null) {
            $input = $this->getCoreArguments();
        }

        if (!ini_get('register_argc_argv')) {
            throw new ConfigurationException('register_argc_argv must be set to On for running Codeception');
        }

        return parent::run($input, $output);
    }