25 #require_once 'Zend/Config/Writer/FileAbstract.php'; 30 #require_once 'Zend/Config/Yaml.php'; 65 if (!is_callable($yamlEncoder)) {
66 #require_once 'Zend/Config/Exception.php'; 70 $this->_yamlEncoder = $yamlEncoder;
82 $data = $this->_config->toArray();
83 $sectionName = $this->_config->getSectionName();
84 $extends = $this->_config->getExtends();
86 if (is_string($sectionName)) {
90 foreach ($extends as $section => $parentSection) {
95 foreach (
$data as $section => $sectionData) {
98 if (!isset(
$data[$sectionExtends])) {
132 $numeric = is_numeric(key(
$data));
136 $encoded =
"\n".self::_encodeYaml($indent+1,
$value);
138 $encoded = (string)
$value.
"\n";
140 $result .= str_repeat(
" ", $indent).($numeric?
"- ":
"$key: ").$encoded;
call_user_func($callable, $param)
setYamlEncoder($yamlEncoder)
static _encodeYaml($indent, $data)