本文整理汇总了PHP中AppKernel::boot方法的典型用法代码示例。如果您正苦于以下问题:PHP AppKernel::boot方法的具体用法?PHP AppKernel::boot怎么用?PHP AppKernel::boot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppKernel
的用法示例。
在下文中一共展示了AppKernel::boot方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
$this->kernel = new \AppKernel('test', true);
$this->kernel->boot();
$this->container = $this->kernel->getContainer();
parent::setUp();
}
示例2: bootstrapApp
/**
* @BeforeSuite
*/
public static function bootstrapApp()
{
// required so that we get the doctrine annotations stuff from that file loaded in
require __DIR__ . '/../../app/autoload.php';
require __DIR__ . '/../../app/AppKernel.php';
self::$kernel = new \AppKernel('test', true);
self::$kernel->boot();
}
示例3: __construct
public function __construct(PHP_CodeCoverage_Driver $driver = NULL, PHP_CodeCoverage_Filter $filter = NULL)
{
require $_SERVER['KERNEL_DIR'] . '/AppKernel.php';
$this->appKernel = new \AppKernel('test', true);
$this->appKernel->boot();
$this->twig = $this->appKernel->getContainer()->get('twig');
$this->twigCacheRegex = '#^' . $this->twig->getCache() . '/././([0-9a-f]+)\\.php$#';
$filter->addDirectoryToWhitelist($this->twig->getCache());
parent::__construct($driver, $filter);
}
示例4: __construct
/**
* Construct a test case.
*/
public function __construct()
{
parent::__construct();
self::$kernel = new \AppKernel('test', true);
self::$kernel->boot();
self::$application = new Application(self::$kernel);
self::$application->setAutoExit(false);
self::$container = self::$kernel->getContainer();
self::$doctrine = $this->get('doctrine');
}
示例5: bootApp
protected function bootApp()
{
if (!$this->booted) {
$this->app->setConfig(['parameters' => ['facade.aliases' => $this->aliases]]);
if ($this->isServiceLocatorSet) {
$this->app->addBundle($this->getFacadeBundle());
//$this->app->register($this->getFacadeProvider(), ['facade.aliases' => $this->aliases]);
}
$this->app->boot();
//handle(Request::createFromGlobals());
$this->booted = true;
}
}
示例6: bootstrapApplication
protected static function bootstrapApplication()
{
$kernel = new \AppKernel(static::$environment, static::$debug);
$kernel->boot();
static::$application = new Application($kernel);
static::$application->setAutoExit(false);
}
示例7: __construct
public function __construct()
{
$kernel = new \AppKernel("test", true);
$kernel->boot();
$this->_container = $kernel->getContainer();
$this->searchEngine = $this->get('beecms.search.service');
}
示例8: buildKernel
private function buildKernel()
{
require_once __DIR__ . "/../../../../../app/AppKernel.php";
$kernel = new \AppKernel("test", true);
$kernel->boot();
return $kernel;
}
示例9: setUp
protected function setUp()
{
$kernel = new \AppKernel('test', true);
$kernel->boot();
$this->container = $kernel->getContainer();
$this->youtube = $this->container->get('awy.google.youtube');
}
示例10: __construct
public function __construct()
{
$kernel = new AppKernel('test', true);
$kernel->boot();
$this->em = $kernel->getContainer()->get('doctrine.orm.entity_manager');
$this->kernel = $kernel;
}
示例11: setUpBeforeClass
public static function setUpBeforeClass()
{
@unlink(__DIR__ . '/../Fixtures/Test/TestBundle/Resources/config/routing.rest.yml');
@unlink(__DIR__ . '/../Fixtures/Test/TestBundle/Controller/CarController.php');
@unlink(__DIR__ . '/../Fixtures/Test/TestBundle/Controller/OrderController.php');
$kernel = new \AppKernel('test', true);
$app = new Application($kernel);
$app->addCommands(array(new GenerateRestControllerCommand()));
$kernel->boot();
$command = $app->find('generate:rest:controller');
$commandTester = new CommandTester($command);
$commandTester->execute(array('command' => $command->getName(), '--controller' => 'TestTestBundle:Order', '--entity' => 'TestTestBundle:Order', '--mongo' => true), array('interactive' => false));
$kernel->shutdown();
$kernel = new \AppKernel('test', true);
$app = new Application($kernel);
$app->addCommands(array(new GenerateRestControllerCommand()));
$kernel->boot();
$command = $app->find('generate:rest:controller');
$commandTester = new CommandTester($command);
$commandTester->execute(array('command' => $command->getName(), '--controller' => 'TestTestBundle:Car', '--entity' => 'TestTestBundle:Car'), array('interactive' => false));
$kernel->shutdown();
@unlink(__DIR__ . '/../app/cache/test/appTestUrlGenerator.php.meta');
@unlink(__DIR__ . '/../app/cache/test/appTestUrlGenerator.php');
@unlink(__DIR__ . '/../app/cache/test/appTestUrlMatcher.php.meta');
@unlink(__DIR__ . '/../app/cache/test/appTestUrlMatcher.php');
}
示例12: __construct
public function __construct()
{
$kernel = new \AppKernel("test", true);
$kernel->boot();
$this->container = $kernel->getContainer();
parent::__construct();
}
示例13: setUp
public function setUp()
{
$kernel = new \AppKernel('test', true);
$kernel->boot();
$this->container = $kernel->getContainer();
$this->service = $this->container->get('dugun_upload.service.upload_service');
}
示例14: setUp
protected function setUp()
{
$kernel = new \AppKernel('test', false);
$kernel->boot();
$this->articleRepository = $kernel->getContainer()->get('app.article_repository');
$this->queryBus = $kernel->getContainer()->get('gnugat_query_bus.query_bus');
}
示例15: setUpBeforeClass
public static function setUpBeforeClass()
{
require_once "{$_SERVER['KERNEL_DIR']}/AppKernel.php";
$kernel = new \AppKernel('test', true);
$kernel->boot();
self::$validator = $kernel->getContainer()->get('validator');
}