tomcizek/symfony-interop-container 问题修复 & 功能扩展

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

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

tomcizek/symfony-interop-container

Composer 安装命令:

composer require tomcizek/symfony-interop-container

包简介

Symfony Interop Container which has config array under 'config' key - for Extensions using Interoperability Factories.

README 文档

README

Build Status Quality Score Code Coverage

This bundle is handy when you want to create symfony vendor bundle that uses interoperability factories with interop config.

Why bother?

It registers 'interop_container' service for you, which has same services as default 'service_container', plus it returns app config array under key 'config'. This config is something you need to define in your extension.

Quick start

1) Install this library through composer

composer require tomcizek/symfony-interop-container

2) Register SymfonyInteropContainerBundle in your kernel

3) Create your Bundle with Extension and register in kernel too, for example:

class TestExtension extends AbstractInteropExtension
{
	public function load(array $configs, ContainerBuilder $containerBuilder)
	{
		// parent call is mandatory, or it will not work as expected!
		parent::load($configs, $containerBuilder);

		// we can set another config key (default is extension alias: $this->getAlias())
		$this->configBuilder->setKey('test');

		// we can merge over another config
		$this->configBuilder->mergeOverByConfig([]);

		// we can merge over multiple configs
		$this->configBuilder->mergeOverByConfigs([[]]);

		// we can merge default config
		$this->configBuilder->mergeDefaultConfig([]);

		// if you want, you can build config by:
		$config = $this->configBuilder->build();

		// it will be built in process method and injected into interop_container service
	}

	public function process(ContainerBuilder $containerBuilder)
	{
		// If you need to redefine process method, parent call is mandatory.
		parent::process($containerBuilder);
	}
}

Contribute

Please feel free to fork and extend existing or add new features and send a pull request with your changes! To establish a consistent code quality, please provide unit tests for all your changes and may adapt the documentation.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-10-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固