I’am trying to rewrite zend framework configuration file from application.ini to application.yml format and I have some unsolvable problem for me.
in application.ini i have this:
pluginPaths.Bisna\Application\Resource\ = "Bisna/Application/Resource"
and it works. But if I try it write to yaml file I get an error about unsupported syntax
pluginPaths:
Bisna\Application\Resource\: Bisna/Application/Resource
I tried so much ways to solve this, but no worked..
Any idea?
It seems that
Zend_Config_Yamldoesn’t support the backslash in the key names. The relevant line in the source code is the following:(Zend/Config/Yaml.php, line 313 in ZF 1.11.11). It’s matching only
[A-Za-z0-9_]for the YAML key names.The parsing method is different from
Zend_Config_Ini, which uses a call to theparse_ini_file()PHP function. That’s why it was working with .ini files.So, I don’t think there is any easy solution, unless you want to modify the ZF source code (which I don’t recommend).
Hope that helps,