Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Notes specific to the YAML writer

The YAML writer lets you optionally specify an alternate YAML encoder to use. By default, one is shipped with the framework that is suitable for most configuration tasks. If you find it insufficient, or wish to use more advanced YAML, you may provide an alternate encoder callback.

The method for doing so is to use the Zend_Config_Writer_Yaml::setYamlEncoder() method, passing it a valid callback.

// Use the Symfony Yaml Component:
$writer = new Zend_Config_Writer_Yaml($filename);

The above uses the Symfony Components' sfYaml component in order to encode the configuration to YAML.

Zend Framework