blanchonvincent/symfony-bridge-module 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

blanchonvincent/symfony-bridge-module

最新稳定版本:0.3.8

Composer 安装命令:

composer require blanchonvincent/symfony-bridge-module

包简介

A bridge to integrate Symfony component

README 文档

README

Master: Build Status

Introduction

This repository will provide bridge to integrate Symfony component.

Console

To integrate the Symfony2 console component, that's pretty easy :

  • Add configuration to your application.config.php :
return array(
    'modules' => array(
        // your usual config there
    ),
    'module_listener_options' => array(
        // your usual config there
    ),
    'service_manager' => array(
        'invokables' => array(
            'SymfonyBridgeModule\Console\CommandsManager' => 'SymfonyBridgeModule\Console\CommandsManager',
        ),
    ),
    'service_listener_options' => array(
        array(
            'service_manager' => 'SymfonyBridgeModule\Console\CommandsManager',
            'config_key' => 'symfony_commands',
            'interface' => 'SymfonyBridgeModule\ModuleManager\Feature\ConsoleCommandsProviderInterface',
            'method' => 'getConsoleCommands',
        ),
    ),
);

Now, just implements the SymfonyBridgeModule\ModuleManager\Feature\ConsoleCommandsProviderInterface interface in the modules to provide commands :

class Module implements ConsoleCommandsProviderInterface
{
    public function getConsoleCommands()
    {
        return array(
            'invokables' => array(
                'foo' => 'SymfonyBridgeModuleTest\Fixtures\FooModule\Command\FooCommand',
            ),
        );
    }
}

Then copy the console console.php.dist and update the file from your project settings. You can try to run the console.php as an example :

php console.php
Available commands:
 foo    
 help   Displays help for a command
 list   Lists commands

The foo command will print Hello world!.

Container Builder

This module provide a gateway to integrate the container builder from Symfony2.

Router

Once you're using the container builder, the route listener will be automatically added. You have just to provide your routing.yml file inside the config folder.

统计信息

  • 总下载量: 1.47k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固