當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Kernel::boot方法代碼示例

本文整理匯總了PHP中Symfony\Component\HttpKernel\Kernel::boot方法的典型用法代碼示例。如果您正苦於以下問題:PHP Kernel::boot方法的具體用法?PHP Kernel::boot怎麽用?PHP Kernel::boot使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Symfony\Component\HttpKernel\Kernel的用法示例。


在下文中一共展示了Kernel::boot方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 /**
  * @return null
  */
 public function setUp()
 {
     $this->kernel = new \AppKernel('test', true);
     $this->kernel->boot();
     $this->container = $this->kernel->getContainer();
     parent::setUp();
 }
開發者ID:uikolas,項目名稱:LT-eshops-search,代碼行數:10,代碼來源:KernelAwareTest.php

示例2: setUpSymfonyKernel

 /**
  * @before
  *
  */
 protected function setUpSymfonyKernel()
 {
     $this->kernel = $this->createKernel();
     $this->kernel->boot();
     $this->container = $this->kernel->getContainer();
     $this->logger = $this->container->get('logger');
 }
開發者ID:CarnegieLearningWeb,項目名稱:ldap-orm-bundle,代碼行數:11,代碼來源:SymfonyKernel.php

示例3: theFollowingAcmePhpConfiguration

 /**
  * @Given the following acme_php configuration:
  */
 public function theFollowingAcmePhpConfiguration(PyStringNode $rawConfig)
 {
     $yaml = new Yaml();
     $config = ['acme_php' => array_merge($this->getDefaultConfig(), $yaml->parse($rawConfig->getRaw()))];
     $this->filesystem->dumpFile($this->acmeConfigPath, $yaml->dump($config, 4));
     $this->kernel->shutdown();
     $this->filesystem->remove($this->kernel->getCacheDir());
     $this->kernel->boot();
 }
開發者ID:acmephp,項目名稱:symfony-bundle,代碼行數:12,代碼來源:FeatureContext.php

示例4: _before

 public function _before(\Codeception\TestCase $test) {
     $this->kernel->boot();
     $this->container = $this->kernel->getContainer();
     if ($this->container->has('test.client')) { // it is Symfony2.2
         $this->client = $this->container->get('test.client');
     } else {
         $this->client = new $this->clientClass($this->kernel);
     }
     $this->client->followRedirects(true);
 }
開發者ID:Vrian7ipx,項目名稱:cascadadev,代碼行數:10,代碼來源:Symfony2.php

示例5: setUpKernel

 /**
  * Sets up the kernel.
  *
  * @return void
  */
 protected function setUpKernel()
 {
     if (null !== $this->kernel) {
         $this->tearDownKernel();
     }
     $this->kernel = $this->createKernel(array('environment' => 'test', 'debug' => true));
     $this->kernel->boot();
     // Create Application
     $this->application = new Application($this->kernel);
     $this->application->setAutoExit(false);
     // Reset database and load fixtures
     $this->runConsole("doctrine:schema:drop", array("--force" => true));
     $this->runConsole("doctrine:schema:create");
     $this->runConsole("doctrine:fixtures:load", array("--no-interaction" => true));
 }
開發者ID:braincrafted,項目名稱:testing-bundle,代碼行數:20,代碼來源:WebTestCase.php

示例6: _initialize

 public function _initialize()
 {
     $cache = getcwd() . DIRECTORY_SEPARATOR . $this->config['app_path'] . DIRECTORY_SEPARATOR . 'bootstrap.php.cache';
     if (!file_exists($cache)) {
         throw new \RuntimeException('Symfony2 bootstrap file not found in ' . $cache);
     }
     require_once $cache;
     $this->kernelClass = $this->getKernelClass();
     $this->kernel = new $this->kernelClass('test', true);
     $this->kernel->boot();
     $dispatcher = $this->kernel->getContainer()->get('event_dispatcher');
     $dispatcher->addListener('kernel.exception', function ($event) {
         throw $event->getException();
     });
 }
開發者ID:BatVane,項目名稱:Codeception,代碼行數:15,代碼來源:Symfony2.php

示例7: _before

 public function _before(\Codeception\TestCase $test)
 {
     $this->kernel->boot();
     $this->container = $this->kernel->getContainer();
     $this->client = new Symfony2Connector($this->kernel);
     $this->client->followRedirects(true);
 }
開發者ID:itillawarra,項目名稱:cmfive,代碼行數:7,代碼來源:Symfony2.php

示例8: boot

 public function boot()
 {
     $modules = array();
     $this->loadModuleBundlesFromFilesystem();
     $this->loadThemeBundlesFromFilesystem();
     parent::boot();
 }
開發者ID:rtznprmpftl,項目名稱:Zikulacore,代碼行數:7,代碼來源:ZikulaKernel.php

示例9: boot

 public function boot()
 {
     parent::boot();
     if ($this->prepareDoctrineAfterBoot === true) {
         $this->prepareDoctrine();
     }
 }
開發者ID:Kyoushu,項目名稱:CommonBundle,代碼行數:7,代碼來源:AppKernel.php

示例10: boot

 public function boot()
 {
     parent::boot();
     if (!$this->container->getParameter('bzion.miscellaneous.development')) {
         if ($this->getEnvironment() != 'prod' || $this->isDebug()) {
             throw new ForbiddenDeveloperAccessException('You are not allowed to access this page in a non-production ' . 'environment. Please change the "development" configuration ' . 'value and clear the cache before proceeding.');
         }
     }
     if (in_array($this->getEnvironment(), array('profile', 'dev'), true)) {
         Debug::enable();
     }
     Service::setGenerator($this->container->get('router')->getGenerator());
     Service::setEnvironment($this->getEnvironment());
     Service::setModelCache(new ModelCache());
     Service::setContainer($this->container);
     $this->setUpTwig();
     // Ratchet doesn't support PHP's native session storage, so use our own
     // if we need it
     if (Service::getParameter('bzion.features.websocket.enabled') && $this->getEnvironment() !== 'test') {
         $storage = new NativeSessionStorage(array(), new DatabaseSessionHandler());
         $session = new Session($storage);
         Service::getContainer()->set('session', $session);
     }
     Notification::initializeAdapters();
 }
開發者ID:kleitz,項目名稱:bzion,代碼行數:25,代碼來源:AppKernel.php

示例11: boot

 public function boot()
 {
     if (!Doctrine\ODM\MongoDB\Types\Type::hasType('object')) {
         Doctrine\ODM\MongoDB\Types\Type::addType('object', 'Payum\\Core\\Bridge\\Doctrine\\Types\\ObjectType');
     }
     parent::boot();
 }
開發者ID:vespolina,項目名稱:vespolina-sandbox,代碼行數:7,代碼來源:AppKernel.php

示例12: boot

 /**
  * dispatch an event when application is boot
  */
 public function boot()
 {
     parent::boot();
     if (self::isInstalled()) {
         $this->getContainer()->get("event_dispatcher")->dispatch(TheliaEvents::BOOT);
     }
 }
開發者ID:alex63530,項目名稱:thelia,代碼行數:10,代碼來源:Thelia.php

示例13: boot

 /**
  * {@inheritdoc}
  */
 public function boot()
 {
     if (true === $this->booted) {
         return;
     }
     parent::boot();
     $this->container->compile();
 }
開發者ID:georgjaehnig,項目名稱:sculpin,代碼行數:11,代碼來源:AbstractKernel.php

示例14: boot

 /**
  * {@inheritdoc}
  */
 public function boot()
 {
     parent::boot();
     if ($kernelModifier = $this->kernelModifier) {
         $kernelModifier($this);
         $this->kernelModifier = null;
     }
 }
開發者ID:aboutcoders,項目名稱:enum-serializer-bundle,代碼行數:11,代碼來源:AppKernel.php

示例15: boot

 public function boot()
 {
     if (true === $this->booted) {
         return;
     }
     ++$this->containerNameCounter;
     return parent::boot();
 }
開發者ID:acmephp,項目名稱:symfony-bundle,代碼行數:8,代碼來源:AppKernel.php


注:本文中的Symfony\Component\HttpKernel\Kernel::boot方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。