Returns the array with default commands.

@return array
766926
protected function getDefaultCommands()
    {
        $commands = parent::getDefaultCommands();
        $commands[] = new InitCommand();
        $commands[] = new InstallReleaseCommand();
        $commands[] = new DeployReleaseCommand();

        return $commands;
    }
794487
protected function getDefaultHandlers()
    {
        return array(
            '+' => new Handler\StatusResponse(),
            '-' => new Handler\ErrorResponse(),
            ':' => new Handler\IntegerResponse(),
            '$' => new Handler\BulkResponse(),
            '*' => new Handler\MultiBulkResponse(),
        );
    }
1225379
protected function getDefaultParameters()
    {
        $defaultParameters = array('--no-debug' => true);

        if ($this->input->hasOption('env')) {
            $defaultParameters['--env'] = $this->input->hasOption('env') ? $this->input->getOption('env') : 'dev';
        }

        if ($this->input->hasOption('no-interaction') && true === $this->input->getOption('no-interaction')) {
            $defaultParameters['--no-interaction'] = true;
        }

        if ($this->input->hasOption('verbose') && true === $this->input->getOption('verbose')) {
            $defaultParameters['--verbose'] = true;
        }

        return $defaultParameters;
    }
621459
protected function getDefaultCommands()
  {
    // Keep the core default commands to have the HelpCommand which is used when using the --help option
    $defaultCommands = parent::getDefaultCommands();

    $defaultCommands[] = new ConstantsCommand();
    $defaultCommands[] = new CrudCommand();
    $defaultCommands[] = new NonStaticCommand();
    $defaultCommands[] = new RoutineLoaderCommand();
    $defaultCommands[] = new RoutineWrapperGeneratorCommand();
    $defaultCommands[] = new StratumCommand();

    return $defaultCommands;
  }
600328
protected function getCommandDescriptions()
    {
        $commands = [];
        foreach ($this->getCommands() as $command) {
            $actions = [];
            $result = Yii::$app->createController($command);
            if ($result !== false && $result[0] instanceof \Hprose\Yii\Controller) {
                list($controller) = $result;
                /** @var Controller $controller */
                $actions = $this->getActions($controller);
            }

            $commands[$command] = $actions;
        }

        return $commands;
    }
176738
protected function get_js_commands()
    {
        $out = '';

        foreach ($this->commands as $i => $args) {
            $method = array_shift($args);
            foreach ($args as $i => $arg) {
                $args[$i] = self::json_serialize($arg, $this->devel_mode, false);
            }

            $out .= sprintf(
                "this.%s(%s);\n",
                preg_replace('/^parent\./', '', $method),
                implode(',', $args)
            );
        }

        return $out;
    }
633229
public function getCommands()
    {
        $name     = $this->getController()->getIdentifier()->name;
        $package  = $this->getIdentifier()->package;
        $manifest = JPATH_ADMINISTRATOR.'/components/com_'.$package.'/'.$package.'.xml';

        if(file_exists($manifest))
        {
            $xml = simplexml_load_file($manifest);

            if(isset($xml->administration->submenu))
            {
                foreach($xml->administration->submenu->children() as $menu)
                {
                    $view = (string)$menu['view'];

                    $this->addCommand((string)$menu, array(
                        'href'   => 'option=com_'.$package.'&view='.$view,
                        'active' => ($name == KStringInflector::singularize($view))
                    ));
                }
            }
        }

        return parent::getCommands();
    }
651928
protected function getDefaultCommands()
    {
        $defaultCommands = parent::getDefaultCommands();

        $defaultCommands[] = new BuildCommand();
        $defaultCommands[] = new ServeCommand();
        $defaultCommands[] = new PublishCommand();
        $defaultCommands[] = new WatchCommand();

        return $defaultCommands;
    }
572400
protected function _getDefaults() : array
    {
        $result = [
            static::FIELD_TYPE => static::DEFAULT_FIELD_TYPE,
            static::FIELD_REQUIRED => static::DEFAULT_FIELD_REQUIRED,
            static::FIELD_NON_SEARCHABLE => static::DEFAULT_FIELD_NON_SEARCHABLE,
            static::FIELD_UNIQUE => static::DEFAULT_FIELD_UNIQUE,
        ];

        return $result;
    }
1284071
public static function commands(){
       $results = [];
       foreach(static::$commands as $name => $cmd){
          $results[] = [
            'name'        => $name,
            'params'      => preg_replace('/:(\w+)/','[$1]',implode(' ',$cmd[0])),
            'description' => $cmd[2],
          ];
       }
       return $results;
    }
5216
protected function getCommands(): array
	{
		// Define core commands

		$commands =
		[
			'app.generate_key'    => GenerateKey::class,
			'app.generate_secret' => GenerateSecret::class,
		];

		if($this->container->has(Routes::class))
		{
			$commands = array_merge($commands,
			[
				'app.routes' => ListRoutes::class,
				'server'     => Server::class,
			]);
		}

		if($this->container->has(CacheManager::class))
		{
			$commands = array_merge($commands,
			[
				'cache.remove' => Remove::class,
				'cache.clear'  => Clear::class,
			]);
		}

		if($this->container->has(DatabaseConnectionManager::class))
		{
			$commands = array_merge($commands,
			[
				'migrate.create' => Create::class,
				'migrate.status' => Status::class,
				'migrate.up'     => Up::class,
				'migrate.down'   => Down::class,
				'migrate.reset'  => Reset::class,
			]);
		}

		// Add application commands

		$commands += $this->config->get('application.commands');

		// Add package commands

		foreach($this->packages as $package)
		{
			$commands += $package->getCommands();
		}

		// Return commands

		return $commands;
	}
634967
protected function getDefaultParameters(): array
	{
		$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
		$last = end($trace);
		$debugMode = static::detectDebugMode();

		return [
			'appDir' => isset($trace[2]['file']) ? dirname($trace[2]['file']) : null,
			'wwwDir' => isset($last['file']) ? dirname($last['file']) : null,
			'debugMode' => $debugMode,
			'productionMode' => !$debugMode,
			'consoleMode' => PHP_SAPI === 'cli',
		];
	}
515177
protected function getShortCommandIdentifiers(): array
    {
        if ($this->shortCommandIdentifiers === null) {
            $this->shortCommandIdentifiers = [];
            $commandsByCommandName = [];
            /** @var Command $availableCommand */
            foreach ($this->getAvailableCommands() as $availableCommand) {
                list($packageKey, $controllerName, $commandName) = explode(':', $availableCommand->getCommandIdentifier());
                if (!isset($commandsByCommandName[$commandName])) {
                    $commandsByCommandName[$commandName] = [];
                }
                if (!isset($commandsByCommandName[$commandName][$controllerName])) {
                    $commandsByCommandName[$commandName][$controllerName] = [];
                }
                $commandsByCommandName[$commandName][$controllerName][] = $packageKey;
            }
            foreach ($this->getAvailableCommands() as $availableCommand) {
                list($packageKey, $controllerName, $commandName) = explode(':', $availableCommand->getCommandIdentifier());
                if (count($commandsByCommandName[$commandName][$controllerName]) > 1 || $this->bootstrap->isCompiletimeCommand($availableCommand->getCommandIdentifier())) {
                    $packageKeyParts = array_reverse(explode('.', $packageKey));
                    for ($i = 1; $i <= count($packageKeyParts); $i++) {
                        $shortCommandIdentifier = implode('.', array_slice($packageKeyParts, 0, $i)) . ':' . $controllerName . ':' . $commandName;
                        try {
                            $this->getCommandByIdentifier($shortCommandIdentifier);
                            $this->shortCommandIdentifiers[$availableCommand->getCommandIdentifier()] = $shortCommandIdentifier;
                            break;
                        } catch (CommandException $exception) {
                        }
                    }
                } else {
                    $this->shortCommandIdentifiers[$availableCommand->getCommandIdentifier()] = sprintf('%s:%s', $controllerName, $commandName);
                }
            }
        }

        return $this->shortCommandIdentifiers;
    }
364897
protected function getCommandNames()
    {
        // Command::Hidden isn't supported before Symfony Console 3.2.0
        // We don't complete hidden command names as these are intended to be private
        if (method_exists('\Symfony\Component\Console\Command\Command', 'isHidden')) {
            $commands = array();

            foreach ($this->application->all() as $name => $command) {
                if (!$command->isHidden()) {
                    $commands[] = $name;
                }
            }

            return $commands;

        } else {

            // Fallback for compatibility with Symfony Console < 3.2.0
            // This was the behaviour prior to pull #75
            $commands = $this->application->all();
            unset($commands['_completion']);

            return array_keys($commands);
        }
    }
468299
def get_default_commands(self):
        
        commands = Application.get_default_commands(self)

        self.add(ConstantsCommand())
        self.add(LoaderCommand())
        self.add(PyStratumCommand())
        self.add(WrapperCommand())

        return commands
445068
private function getDefaultProviders()
    {
        $defaultProviders = array();

        foreach ($this->defaultProviders as $provider) {
            $defaultProviders[$provider] = $this->getProvider($provider);
        }

        return $defaultProviders;
    }
1278828
public function getArguments()
    {
        $arguments = array();
        foreach ($this->commandArguments as $argument) {
            $arguments[] = $this->$argument;
        }
        return $arguments;
    }