Last active
December 17, 2015 07:49
-
-
Save marzocchi/5575715 to your computer and use it in GitHub Desktop.
Boots a Symfony 2.0 kernel when running boris from the project directory, and make the DIC available as $container.
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
<?php | |
/** | |
* Boots a Symfony 2.0 kernel when running boris from the project directory, and | |
* make the DIC available as $container. | |
*/ | |
require_once __DIR__ . '/app/bootstrap.php.cache'; | |
require_once __DIR__ . '/app/AppKernel.php'; | |
$kernel = new AppKernel('dev', true); | |
$kernel->boot(); | |
$boris->setLocal('container', $kernel->getContainer()); | |
$boris->setLocal('kernel', $kernel); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment