【发布时间】:2016-03-17 15:08:59
【问题描述】:
我在理解如何在 symfony 中解析 yml 文件时遇到问题。
我像这样运行命令:dropcat --env=dev
public function __construct()
{
$input = new ArgvInput();
$env = $input->getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev');
$running_path = getcwd();
$config = Yaml::parse(
file_get_contents($running_path .'/' . $env . '_dropcat.yml')
);
$this->configuration = $config;
}
在我的文件 (dev_dropcat.yml) 中,我有:
imports:
- { resource: 'dropcat.yml' }
remote:
environment:
server: myhosts
我的理解是解析dev_dropcat.yml的时候也应该导入dropcat.yml里面的内容,但是没有。谁能指出我正确的方向?
【问题讨论】: