定制 rapotor/console-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rapotor/console-bundle

Composer 安装命令:

composer require rapotor/console-bundle

包简介

Execute Symfony2 command directly from the application

关键字:

README 文档

README

The Sf2gen namespace will be used for a future project. Sf2genConsoleBundle will be a little part of it. Sf2genConsoleBundle give you the possibility to be able to execute a console command direclty from your application. The interface is loaded with the same way than the WebProfilerBundle.

Features

  • Command autocompletion
  • Command history

Use it

Instead of typing php app/console list, you will just have to type list. The dot is an alias for list.

Have a look :

Screenshot

Screenshot

Screenshot

Installation

  1. Add this bundle to your vendor/ dir:

    $ git submodule add git://github.com/RapotOR/ConsoleBundle.git vendor/bundles/Sf2gen/Bundle/ConsoleBundle

  2. Add the Sf2gen namespace to your autoloader:

    // app/autoload.php $loader->registerNamespaces(array( 'Sf2gen' => DIR.'/../vendor/bundles', // other namespaces ));

  3. Add this bundle to your application's kernel, in the debug section:

    // app/ApplicationKernel.php public function registerBundles() { $bundles = array( // all bundles );

       if (in_array($this->getEnvironment(), array('dev', 'test'))) {
           // previous bundles like WebProfilerBundle
           $bundles[] = new Sf2gen\Bundle\ConsoleBundle\Sf2genConsoleBundle();
       }
    
       return $bundles;
    

    }

  4. Add the following ressource to your routing_dev.yml:

    // app/config/routing_dev.yml _sf2gencdt: resource: "@Sf2genConsoleBundle/Resources/config/routing.yml" prefix: /_sf2gencdt

  5. You have to disable the firewall if you use the security component:

    app/config/config.yml

    security: firewalls: sf2gen: pattern: /_sf2gencdt/.* security: false

  6. Here is the full configuration:

    app/config/config.yml

    sf2gen_console: new_process: true # use a new shell process to launch the command toolbar: true # display the toolbar in the current application ; to be disabled to use it in a third application. local: true # add the current application to list of available apps ; if false, the current application is excluded. all: false # will add all apps with a console available without using apps in configuration. env: %kernel.environment% #the env used for the kernel setup apps: # use this to have a well defined list. - app - symfony-standard

统计信息

  • 总下载量: 79
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 26
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 26
  • Watchers: 2
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-06-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固