src/Application.php
protected function getDefaultCommands()
    {
        $commands   = parent::getDefaultCommands();
        $commands[] = new Command\AboutCommand($this->app);
        $commands[] = new Command\StopCommand($this->app);

        // Comandos da aplicacao
        $cmds = config('app.commands', []);
        foreach ($cmds as $cid => $cClass)
        {
            $cid = sprintf('command.%s', $cid);
            $this->app->bind($cid, $cClass);
            $commands[] = $this->app[$cid];
        }

        // verificar se deve incluir o comando make:command
        if (('phar:' !== substr(__FILE__, 0, 5)) && (class_exists('\Consolle\Command\MakeCommand')))
            $commands[] = new \Consolle\Command\MakeCommand($this->app);

        // verificar se deve incluir o comando optimize
        if (('phar:' !== substr(__FILE__, 0, 5)) && (class_exists('\Consolle\Command\OptimizeCommand')))
            $commands[] = new \Consolle\Command\OptimizeCommand($this->app);

        // verificar se deve incluir o comando self-compiler
        if (('phar:' !== substr(__FILE__, 0, 5)) && (class_exists('\Consolle\Command\SelfCompilerCommand')))
            $commands[] = new \Consolle\Command\SelfCompilerCommand($this->app);

        // Verificar se deve incluir o comando self-update
        if (('phar:' === substr(__FILE__, 0, 5)) && (class_exists('\Consolle\Command\SelfCompilerCommand')) && (file_exists(base_path('update.json'))))
            $commands[] = new \Consolle\Command\SelfUpdateCommand($this->app);

        return $commands;
    }
protected function getDefaultCommands()
    {
        $commands   = parent::getDefaultCommands();
        $commands[] = new Command\AboutCommand($this->app);
        $commands[] = new Command\StopCommand($this->app);

        // Comandos da aplicacao
        $cmds = config('app.commands', []);
        foreach ($cmds as $cid => $cClass)
        {
            $cid = sprintf('command.%s', $cid);
            $this->app->bind($cid, $cClass);
            $commands[] = $this->app[$cid];
        }

        // verificar se deve incluir o comando make:command
        if (('phar:' !== substr(__FILE__, 0, 5)) && (class_exists('\Consolle\Command\MakeCommand')))
            $commands[] = new \Consolle\Command\MakeCommand($this->app);

        // verificar se deve incluir o comando optimize
        if (('phar:' !== substr(__FILE__, 0, 5)) && (class_exists('\Consolle\Command\OptimizeCommand')))
            $commands[] = new \Consolle\Command\OptimizeCommand($this->app);

        // verificar se deve incluir o comando self-compiler
        if (('phar:' !== substr(__FILE__, 0, 5)) && (class_exists('\Consolle\Command\SelfCompilerCommand')))
            $commands[] = new \Consolle\Command\SelfCompilerCommand($this->app);

        // Verificar se deve incluir o comando self-update
        if (('phar:' === substr(__FILE__, 0, 5)) && (class_exists('\Consolle\Command\SelfCompilerCommand')) && (file_exists(base_path('update.json'))))
            $commands[] = new \Consolle\Command\SelfUpdateCommand($this->app);

        return $commands;
    }
protected function getDefaultCommands ( ) { $ commands = parent :: getDefaultCommands ( ) ; $ commands [ ] = new Command \ AboutCommand ( $ this -> app ) ; $ commands [ ] = new Command \ StopCommand ( $ this -> app ) ; // Comandos da aplicacao $ cmds = config ( 'app.commands' , [ ] ) ; foreach ( $ cmds as $ cid => $ cClass ) { $ cid = sprintf ( 'command.%s' , $ cid ) ; $ this -> app -> bind ( $ cid , $ cClass ) ; $ commands [ ] = $ this -> app [ $ cid ] ; } // verificar se deve incluir o comando make:command if ( ( 'phar:' !== substr ( __FILE__ , 0 , 5 ) ) && ( class_exists ( '\Consolle\Command\MakeCommand' ) ) ) $ commands [ ] = new \ Consolle \ Command \ MakeCommand ( $ this -> app ) ; // verificar se deve incluir o comando optimize if ( ( 'phar:' !== substr ( __FILE__ , 0 , 5 ) ) && ( class_exists ( '\Consolle\Command\OptimizeCommand' ) ) ) $ commands [ ] = new \ Consolle \ Command \ OptimizeCommand ( $ this -> app ) ; // verificar se deve incluir o comando self-compiler if ( ( 'phar:' !== substr ( __FILE__ , 0 , 5 ) ) && ( class_exists ( '\Consolle\Command\SelfCompilerCommand' ) ) ) $ commands [ ] = new \ Consolle \ Command \ SelfCompilerCommand ( $ this -> app ) ; // Verificar se deve incluir o comando self-update if ( ( 'phar:' === substr ( __FILE__ , 0 , 5 ) ) && ( class_exists ( '\Consolle\Command\SelfCompilerCommand' ) ) && ( file_exists ( base_path ( 'update.json' ) ) ) ) $ commands [ ] = new \ Consolle \ Command \ SelfUpdateCommand ( $ this -> app ) ; return $ commands ; }
Initializes all the commands default
Initializes all the commands default