public function __construct($type = self::PARSER_YAML)
{
$locator = new FileLocator([]);
$this->config = new Config([new YamlLoader($locator), new JsonLoader($locator)]);
switch ($type) {
case self::PARSER_YAML:
$this->type = Config::TYPE_YAML;
break;
case self::PARSER_JSON:
$this->type = Config::TYPE_JSON;
break;
default:
throw new \RuntimeException(sprintf('Invalid attributte parser type: "%s".', $type));
}
}