本文整理汇总了PHP中Symfony\Component\Config\Loader\LoaderInterface类的典型用法代码示例。如果您正苦于以下问题:PHP LoaderInterface类的具体用法?PHP LoaderInterface怎么用?PHP LoaderInterface使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LoaderInterface类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: registerContainerConfiguration
/**
* Loads the container configuration.
*
* @param LoaderInterface $loader A LoaderInterface instance
* @api
*/
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__ . '/Resources/config/default.yml');
if ($this->config) {
$loader->load(__DIR__ . '/Resources/config/' . $this->config);
}
}
示例2: registerContainerConfiguration
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__ . '/config/config_' . $this->getEnvironment() . '.yml');
if (is_file($file = __DIR__ . '/config/config_' . $this->getEnvironment() . '_local.yml')) {
$loader->load($file);
}
}
示例3: registerContainerConfiguration
public function registerContainerConfiguration(LoaderInterface $loader)
{
$file = $this->getRootDir() . '/config.yml';
$contents = Yaml::dump($this->_config);
file_put_contents($file, $contents);
$loader->load($file);
}
示例4: registerContainerConfiguration
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__ . '/config/config_' . $this->getEnvironment() . '.yml');
if (null !== $this->devConfig) {
$loader->load($this->devConfig);
}
}
示例5: registerContainerConfiguration
/**
* {@inheritdoc}
*/
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__ . '/config.yml');
if (is_callable($this->configCallback)) {
$loader->load($this->configCallback);
}
}
示例6: registerContainerConfiguration
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__ . '/config/config_' . $this->getEnvironment() . '.yml');
$loader->load(__DIR__ . '/config/security.yml');
$loader->load(__DIR__ . '/config/roles.yml');
$loader->load(__DIR__ . '/config/resources.yml');
}
示例7: registerContainerConfiguration
public function registerContainerConfiguration(LoaderInterface $loader)
{
if (!file_exists($filename = $this->getRootDir() . '/' . $this->testCase . '/config.yml')) {
throw new \RuntimeException(sprintf('The config file "%s" does not exist.', $filename));
}
$loader->load($filename);
}
示例8: registerContainerConfiguration
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__ . '/config/config_plugin.yml');
foreach ($this->pluginAdapter->getConfigurationFiles() as $file) {
$loader->load($file);
}
}
示例9: registerContainerConfiguration
public function registerContainerConfiguration(\Symfony\Component\Config\Loader\LoaderInterface $loader)
{
$config = array('secret' => '$ecret', 'router' => array('resource' => '%kernel.root_dir%/routing_test.yml'), 'form' => NULL, 'csrf_protection' => NULL, 'validation' => array('enable_annotations' => true), 'templating' => array('engines' => array(0 => 'twig')), 'fragments' => NULL, 'test' => NULL, 'session' => array('storage_id' => 'session.storage.mock_file'), 'profiler' => array('collect' => false));
$loader->load(function (ContainerBuilder $container) use($config) {
$container->loadFromExtension('framework', $config);
});
}
示例10: registerContainerConfiguration
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load($this->getRootDir() . '/config/config.yml');
if ($this->isDebug()) {
$loader->load($this->getRootDir() . '/config/config_dbg.yml');
}
}
示例11: registerContainerConfiguration
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(SuluTestBundle::getConfigDir() . '/config.php');
if (class_exists('Sulu\\Bundle\\SearchBundle\\SuluSearchBundle')) {
$loader->load(__DIR__ . '/config/search.yml');
}
}
示例12: registerContainerConfiguration
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__ . '/config/config.php');
if ($this->getEnvironment() !== 'behat' && file_exists(ResourceContext::getConfigurationFile())) {
$loader->import(ResourceContext::getConfigurationFile());
}
}
示例13: registerContainerConfiguration
/**
* Loads the container configuration.
*
* @param LoaderInterface $loader A LoaderInterface instance
*
* @api
*/
public function registerContainerConfiguration(LoaderInterface $loader)
{
if (null != $this->config) {
$loader->load($this->config);
}
$loader->load(__DIR__ . '/config/default.yml');
}
示例14: configureContainer
protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader)
{
$loader->load(__DIR__ . '/config/config.yml');
if (isset($this->bundles['WebProfilerBundle'])) {
$c->loadFromExtension('web_profiler', ['toolbar' => TRUE, 'intercept_redirects' => FALSE]);
}
}
示例15: registerContainerConfiguration
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__ . '/config/' . $this->environment . '.yml');
if (class_exists('Dunglas\\ApiBundle\\DunglasApiBundle')) {
$loader->load(__DIR__ . '/config/dunglas_api.yml');
}
}