src/Core/Package/AbstractPackage.php
public function registerCommands(Console $console)
    {
        $commands = (array) $this->get('console.commands');

        foreach ($commands as $class) {
            if (class_exists($class) && is_subclass_of($class, Command::class)) {
                $console->addCommand($this->container->createObject($class));
            }
        }
    }
public function registerCommands(Console $console)
    {
        $commands = (array) $this->get('console.commands');

        foreach ($commands as $class) {
            if (class_exists($class) && is_subclass_of($class, Command::class)) {
                $console->addCommand($this->container->createObject($class));
            }
        }
    }
public function registerCommands ( Console $ console ) { $ commands = ( array ) $ this -> get ( 'console.commands' ) ; foreach ( $ commands as $ class ) { if ( class_exists ( $ class ) && is_subclass_of ( $ class , Command :: class ) ) { $ console -> addCommand ( $ this -> container -> createObject ( $ class ) ) ; } } }
Register commands to console.

@param Console $console Windwalker console object.

@return  void
Register commands to console .