当前位置: 首页>>代码示例>>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;未经允许,请勿转载。