PHP code example of kerasai / container-aware
1. Go to this page and download the library: Download kerasai/container-aware library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kerasai / container-aware example snippets
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();