当前位置: 首页>>代码示例>>PHP>>正文


PHP AppKernel::boot方法代码示例

本文整理汇总了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();
 }
开发者ID:Codixis,项目名称:CSBill,代码行数:7,代码来源:KernelAwareTest.php

示例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();
 }
开发者ID:zcichanski,项目名称:symfony2-rest,代码行数:11,代码来源:ProjectContext.php

示例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);
 }
开发者ID:Trismegiste,项目名称:thatch,代码行数:10,代码来源:CodeCoverage.php

示例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');
 }
开发者ID:ubermichael,项目名称:symftest,代码行数:13,代码来源:FixturesTestCase.php

示例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;
     }
 }
开发者ID:mrubiosan,项目名称:facade,代码行数:13,代码来源:Symfony2Context.php

示例6: bootstrapApplication

 protected static function bootstrapApplication()
 {
     $kernel = new \AppKernel(static::$environment, static::$debug);
     $kernel->boot();
     static::$application = new Application($kernel);
     static::$application->setAutoExit(false);
 }
开发者ID:noregression,项目名称:test-bundle,代码行数:7,代码来源:IsolatedTestTrait.php

示例7: __construct

 public function __construct()
 {
     $kernel = new \AppKernel("test", true);
     $kernel->boot();
     $this->_container = $kernel->getContainer();
     $this->searchEngine = $this->get('beecms.search.service');
 }
开发者ID:beecms,项目名称:search-bundle,代码行数:7,代码来源:SearchEngineTest.php

示例8: buildKernel

 private function buildKernel()
 {
     require_once __DIR__ . "/../../../../../app/AppKernel.php";
     $kernel = new \AppKernel("test", true);
     $kernel->boot();
     return $kernel;
 }
开发者ID:nebuchar,项目名称:ddd-blog,代码行数:7,代码来源:TestsEnvironment.php

示例9: setUp

 protected function setUp()
 {
     $kernel = new \AppKernel('test', true);
     $kernel->boot();
     $this->container = $kernel->getContainer();
     $this->youtube = $this->container->get('awy.google.youtube');
 }
开发者ID:andywooyay,项目名称:AwyGoogleApiBundle,代码行数:7,代码来源:YoutubeTest.php

示例10: __construct

 public function __construct()
 {
     $kernel = new AppKernel('test', true);
     $kernel->boot();
     $this->em = $kernel->getContainer()->get('doctrine.orm.entity_manager');
     $this->kernel = $kernel;
 }
开发者ID:heristop,项目名称:HeriWebServiceBundle,代码行数:7,代码来源:ClientTest.php

示例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');
 }
开发者ID:amstaffix,项目名称:extjs-bundle,代码行数:26,代码来源:BaseTestGeneratedRestController.php

示例12: __construct

 public function __construct()
 {
     $kernel = new \AppKernel("test", true);
     $kernel->boot();
     $this->container = $kernel->getContainer();
     parent::__construct();
 }
开发者ID:vladislavs1321,项目名称:demo,代码行数:7,代码来源:SearchServiceTest.php

示例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');
 }
开发者ID:duguncom,项目名称:DugunUploadBundle,代码行数:7,代码来源:DownloadTest.php

示例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');
 }
开发者ID:gnugat,项目名称:query-bus-bundle,代码行数:7,代码来源:ServiceTest.php

示例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');
 }
开发者ID:kadala,项目名称:AcmePizzaBundle,代码行数:7,代码来源:AbstractEntityTest.php


注:本文中的AppKernel::boot方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。