Skip to content

alexpts/php-symfony-di-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Symfony DI component loader

phpunit codecov

Simple loader for symfony container DependencyInjection component

Install

composer require alexpts/symfony-di-loader

Demo

<?php
use PTS\SymfonyDiLoader\LoaderContainer;

$configs = [
    __DIR__ . './container.yml',
    __DIR__ . './container.xml',
    __DIR__ . './container.php'
];
$fileCache = __DIR__ . '/var/di.php';
$isDebug = true;

$loader = new LoaderContainer;
$container = $loader->getContainer($configs, $fileCache, $isDebug);

Custom container extension:

use PTS\SymfonyDiLoader\LoaderContainer;

$loader = new LoaderContainer;
$builder = $loader->getBuilder();
$builder->addExtension($someContainerExtension);
$container = $loader->getContainer($configs, $fileCache);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages