承接 kerasai/container-aware 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

kerasai/container-aware

Composer 安装命令:

composer require kerasai/container-aware

包简介

Tooling inject container into services.

README 文档

README

This package adds utilities for making code "container aware".

Usage

To build a service container and automatically inject the container to all container aware services:

<?php

use Kerasai\ContainerAware\ContainerAwareCompilerPass;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;

$containerBuilder = new ContainerBuilder();
$loader = new YamlFileLoader($containerBuilder, new FileLocator(__DIR__));
$loader->load('services.yml');
$containerBuilder->addCompilerPass(new ContainerAwareCompilerPass());
$containerBuilder->compile();

And on your services, implement the \Symfony\Component\DependencyInjection\ContainerAwareInterface interface. Also use \Symfony\Component\DependencyInjection\ContainerAwareTrait to easily implement the interface.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2020-04-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固