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