定制 cdx/sf-dependency-injection-bridge 二次开发

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

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

cdx/sf-dependency-injection-bridge

Composer 安装命令:

composer require cdx/sf-dependency-injection-bridge

包简介

Symfony dependency injection bridge into ZF2

README 文档

README

Build Status

Zf2 module to use Symfony Dependency Injection (symfony/dependency-injection).

Requirements

Please see the composer.json file.

Installation

You can install using:

curl -s https://getcomposer.org/installer | php
php composer.phar install

You can import the sf-dependency-injection-bridge module into an existing application by adding cdx/sf-dependency-injection-bridge to your composer.json "require" section. You should also add the module to your application's configuration:

'modules' => array (
    /* ... */
    'Cdx\SfDependencyInjectionBridge',
),

Configuration

This module load each module configuration files to search the sf_dependency_injection_bridge key. To add an dependency you should set in the module configuration file:

return array (
    'router' => /* ... */
    'service_manager' => /* ... */
    /* ... */
    'sf_dependency_injection_bridge' => [
        'config_files' => [
            __DIR__ . '/services.yml',
            /* ... */
        ],
        'service_locator_mapping' => [
            'Doctrine\\ORM\\EntityManager' => 'Doctrine\\ORM\\EntityManager',
            /* ... */
        ]
    ],

You can specify any service loaded in service locator to set them onto the ContainerBuilder of Symfony. Moreover, you can load any file you want in Yaml format to load services onto it too.

See documentation of Symfony Dependency Injection.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-10