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


PHP LoaderInterface::import方法代碼示例

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


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

示例1: registerContainerConfiguration

 public function registerContainerConfiguration(LoaderInterface $loader)
 {
     $loader->load(__DIR__ . '/config/config.php');
     if ($this->getEnvironment() !== 'behat' && file_exists(ResourceContext::getConfigurationFile())) {
         $loader->import(ResourceContext::getConfigurationFile());
     }
 }
開發者ID:frogriotcom,項目名稱:ResourceRestBundle,代碼行數:7,代碼來源:AppKernel.php

示例2: registerContainerConfiguration

 /**
  * {@inheritdoc}
  */
 public function registerContainerConfiguration(LoaderInterface $loader)
 {
     $loader->import($this->getRootDir() . '/config/parameters.php');
     $loader->load(function ($container) {
         $container->loadFromExtension('framework', array('test' => null, 'secret' => 'secret', 'router' => array('resource' => '%kernel.root_dir%/config/routing.yml')));
         $container->loadFromExtension('doctrine', array('dbal' => array('driver' => 'pdo_mysql', 'dbname' => 'symfony_project', 'user' => '%database.user%', 'password' => '%database.password%', 'server_version' => '5.6'), 'orm' => array('auto_mapping' => false, 'mappings' => array('Lakion\\ApiTestCase' => array('dir' => '%kernel.root_dir%/config/doctrine', 'prefix' => 'Lakion\\ApiTestCase\\Test\\Entity', 'alias' => 'ApiTestCase', 'is_bundle' => false, 'type' => 'yml')))));
         $container->setDefinition('app.service', new Definition('Lakion\\ApiTestCase\\Test\\Service\\DummyService'));
     });
 }
開發者ID:bendavies,項目名稱:ApiTestCase,代碼行數:12,代碼來源:AppKernel.php

示例3: registerContainerConfiguration

 /**
  * Loading the config for the current evironment 
  * and importing platform-specific parameters depending of computer's name
  * 
  * With this system you can store/commit/track (or not with .gitignore) every change in
  * every config on every computer. Reduce the rate of "But it works on my computer !"
  * 
  * I prefer this system than one from Incenteev but you can mix both
  * 
  * @param \Symfony\Component\Config\Loader\LoaderInterface $loader
  */
 public function registerContainerConfiguration(LoaderInterface $loader)
 {
     $loader->load($this->rootDir . '/config/config_' . $this->getEnvironment() . '.yml');
     $loader->import($this->rootDir . Script::getPlatformSubdir() . Script::getPlatformName() . '.yml');
 }
開發者ID:trismegiste,項目名稱:symfony-prelude,代碼行數:16,代碼來源:Kernel.php

示例4: registerContainerConfiguration

 public function registerContainerConfiguration(LoaderInterface $loader)
 {
     $loader->import(CMF_TEST_CONFIG_DIR . '/default.php');
     $loader->import(CMF_TEST_CONFIG_DIR . '/phpcr_odm.php');
     $loader->load(__DIR__ . '/config/config.yml');
 }
開發者ID:dantleech,項目名稱:phpcr-migrations-bundle,代碼行數:6,代碼來源:AppKernel.php


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