remi-san/sf-di-tools

一套用于 symfony DI 的工具

v0.1.1 2021-02-21 14:59 UTC

This package is auto-updated.

Last update: 2024-09-21 22:42:37 UTC


README

Author Build Status Quality Score Software License Packagist Version Coverage Status SensioLabsInsight

为 symfony 提供易于使用的工具

内容

此库提供了以下实用类

  • YamlCachedContainerBuilder 允许通过 YAML 配置文件轻松管理缓存的 Symfony Dependency Injector 容器。

使用示例

YamlCachedContainerBuilder

$cacheBuilder = new YamlCachedContainerBuilder('path/to/cache/dir', false);
$container = $cacheBuilder->build('path/to/config/dir', 'root-config-file.yml', 'MyCachedContainer', 'MyProject\\Cache');