xabbuh/di-configuration-bundle 问题修复 & 功能扩展

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

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

xabbuh/di-configuration-bundle

最新稳定版本:v0.1.0

Composer 安装命令:

composer require xabbuh/di-configuration-bundle

包简介

Override Symfony service definition configuration with ease

README 文档

README

This bundle makes it possible to easily customise existing service definitions defined in third-party bundles.

Note: Many bundles offer their own configuration options to customise how their services are configured. Please refer to their documentation first for available configuration options before using this bundle.

Installation

Use Composer to install the bundle:

$ composer require xabbuh/di-configuration-bundle

Then, enable it in your application:

// app/AppKernel.php
// ...

public function registerBundles()
{
    $bundles = array(
        // ...
        new Xabbuh\DiConfigurationBundle\XabbuhDiConfigurationBundle(),
    );

    // ...

    return $bundles;
}

Configuration

Note: You can only change the configuration of existing services. The bundle is not meant to be used to configure new services. If you want to add your own services use the built-in Symfony configuration mechanisms.

Customize Service Definitions

Change the class name of a service:

xabbuh_di_configuration:
    logger:
        class: app.logger

If you do not want to configure any other options of a particular service, you can omit the class key:

xabbuh_di_configuration:
    monolog.logger: app.logger

You can replace existing arguments using the arguments key. A reference to another service needs to be the service id prefixed with the @ character:

xabbuh_di_configuration:
    locale_listener:
        arguments:
            - de
            - @app.router

You can use the index key for an argument if you do not want to replace all arguments, but want to skip some of them. The following example only replaces the first and the third argument of the locale_listener service, but leaves the second argument as is:

xabbuh_di_configuration:
    locale_listener:
        arguments:
            - de
            - index: 2
              value: @app.request_stack

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固