Created
April 15, 2015 17:14
-
-
Save aurimasniekis/64415594258ac03cba76 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\Config\FileLocator; | |
use Symfony\Component\DependencyInjection\Definition; | |
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | |
use Symfony\Component\DependencyInjection\Loader; | |
/** | |
* This is the class that loads and manages your bundle configuration | |
* | |
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html} | |
*/ | |
class EPWTXhprofExtension extends Extension | |
{ | |
/** | |
* {@inheritdoc} | |
*/ | |
public function load(array $configs, ContainerBuilder $container) | |
{ | |
$configuration = new Configuration(); | |
$config = $this->processConfiguration($configuration, $configs); | |
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | |
$loader->load('services.xml'); | |
$definition = new Definition('Acme\DemoBundle\Demo'); | |
$definition->addMethodCall('setFoo', ['bar']); | |
$container->setDefinition('acme_demo', $definition); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment