Register new command

@param string|\Projek\CI\Console\Commands $command Command instances
349768
public function add_command($command)
    {
        if (is_string($command)) {
            $command = (new \ReflectionClass($command))->newInstance(self::$CI);
        }

        if (!$command instanceof Commands) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Argument 1 passed to %s must be an instance of %s, %s given',
                    __NAMESPACE__ . '\Cli::add_command()',
                    __NAMESPACE__ . '\Commands',
                    gettype($command)
                )
            );
        }

        $this->commands[$command->name()] = $command;
    }
9564
protected function registerMakeProviderCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Generators\Commands\ProviderMakeCommand($app);
        });
    }
1061480
private function register_commands() {
		foreach ( $this->commands as $class_name ) {
			\WP_CLI::add_command( $class_name::COMMAND_NAME, $class_name );
		}
	}
811219
public function registerCommand($command, $callable, array $options = [])
    {
        if (array_key_exists($command, $this->commands)) {
            throw new \Exception("A command with the name {$command} already exists.");
        }

        list($commandInstance, $options) = $this->buildCommand($command, $callable, $options);
        $this->commands[$command]        = $commandInstance;

        foreach ($options['aliases'] as $alias) {
            $this->addCommandAlias($alias, $command);
        }

        return $commandInstance;
    }
36857
protected function registerMakeCommand()
    {
        $this->app->singleton('command.repository.make', function ($app) {
            $prefix = $app['config']['repository.prefix'];
            $suffix = $app['config']['repository.suffix'];
            $contract = $app['config']['repository.contract'];
            $namespace = $app['config']['repository.namespace'];
            $creator = $app['repository.creator'];
            $files = $app['files'];

            return new RepositoryMakeCommand($creator, $prefix, $suffix, $contract, $namespace, $files);
        });

        $this->commands('command.repository.make');
    }
642898
public function addCommand(Command $command) {
        $this->commands[$command->getName()] = $command;
        $command->freeze();
        return $this;
    }
269551
public function registerCommand($command, $help)
    {
        if (isset($this->setup[$command])) {
            throw new Exception("Command $command already registered");
        }

        $this->setup[$command] = array(
            'opts' => array(),
            'args' => array(),
            'help' => $help
        );

    }
108268
public function registerCommands()
    {
        $commands = (array) $this->get('console.commands');

        foreach ($commands as $command) {
            if ($command === false) {
                continue;
            }

            if (is_string($command)) {
                $command = $this->container->createObject($command);
            }

            $this->addCommand($command);
        }
    }
11059
public function registerSubCommand($command, $callable, array $options = [])
    {
        if (array_key_exists($command, $this->subCommands)) {
            throw new \Exception("A sub-command with the name {$command} already exists.");
        }

        list($commandInstance, $options) = $this->client->buildCommand($command, $callable, $options);
        $this->subCommands[$command]     = $commandInstance;

        foreach ($options['aliases'] as $alias) {
            $this->addSubCommandAlias($alias, $command);
        }

        return $commandInstance;
    }
1293049
public function add(SymfonyCommand $command)
    {
        if ($command instanceof Command) {
            $command->setLaravel($this->laravel);
        }

        return $this->addToParent($command);
    }
812896
protected function registerAddonListCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Addons\Commands\AddonListCommand($app);
        });
    }
1127112
public function fire(Command $command)
    {
        $this->command = $command;

        if ($command->option('verbose')) {
            $command->blockMessage('User', 'Creating Admin User...', 'comment');
        }

        $this->seedAdminRole();
        $this->createFirstUser();
    }
1130097
public function addCommand($command)
    {
        if (is_string($command)) {
            $command = $this->app->make($command);
        }

        if ($command instanceof Command) {
            $command->setLaravel($this->app);
        }

        $this->console->add($command);
    }
405730
public function addCommand(\Parable\Console\Command $command)
    {
        $command->prepare($this, $this->output, $this->input, $this->parameter);
        $this->commands[$command->getName()] = $command;
        return $this;
    }
1295064
public function command($command)
    {
        if (! $command instanceof Command) {
            $command = $this[$command];
        }

        $this['console']->add($command);
    }
506576
protected function registerMakeModelCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Generators\Commands\ModelMakeCommand($app);
        });
    }
703340
public function setCommand(Command $command) : self
    {
        $this->command = $command;

        if ($this instanceof ConsoleOutput && $this->getErrorOutput() instanceof ErrorOutput) {
            $this->getErrorOutput()->setCommand($command);
        }

        return $this;
    }