. */ /** * Doctrine_Parser_Yml * * @package Doctrine * @subpackage Parser * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.phpdoctrine.com * @since 1.0 * @version $Revision: 1080 $ * @author Jonathan H. Wage */ class Doctrine_Parser_Yml extends Doctrine_Parser { /** * dumpData * * Dump an array of data to a specified path or return * * @param string $array Array of data to dump to yaml * @param string $path Path to dump the yaml to * @return string $yaml * @return void */ public function dumpData($array, $path = null) { $spyc = new Doctrine_Spyc(); $data = $spyc->dump($array, false, false); return $this->doDump($data, $path); } /** * loadData * * Load and parse data from a yml file * * @param string $path Path to load yaml data from * @return array $array Array of parsed yaml data */ public function loadData($path) { $contents = $this->doLoad($path); $spyc = new Doctrine_Spyc(); $array = $spyc->load($contents); return $array; } }