當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。