diff --git a/lib/Doctrine/Parser/Yml.php b/lib/Doctrine/Parser/Yml.php index 2a36f1240..8ecccc85d 100644 --- a/lib/Doctrine/Parser/Yml.php +++ b/lib/Doctrine/Parser/Yml.php @@ -45,7 +45,7 @@ class Doctrine_Parser_Yml extends Doctrine_Parser */ public function dumpData($array, $path = null) { - $spyc = new Spyc(); + $spyc = new DoctrineSpyc(); $yml = $spyc->dump($array, false, false); @@ -66,7 +66,7 @@ class Doctrine_Parser_Yml extends Doctrine_Parser */ public function loadData($path) { - $spyc = new Spyc(); + $spyc = new DoctrineSpyc(); $array = $spyc->load($path); diff --git a/lib/Doctrine/Parser/spyc.php b/lib/Doctrine/Parser/spyc.php index 0de32c97d..f974d92a7 100644 --- a/lib/Doctrine/Parser/spyc.php +++ b/lib/Doctrine/Parser/spyc.php @@ -1,20 +1,20 @@ * @author Vlad Andersen * @link http://spyc.sourceforge.net/ * @copyright Copyright 2005-2006 Chris Wanstrath * @license http://www.opensource.org/licenses/mit-license.php MIT License - * @package Spyc + * @package DoctrineSpyc */ /** - * A node, used by Spyc for parsing YAML. - * @package Spyc + * A node, used by DoctrineSpyc for parsing YAML. + * @package DoctrineSpyc */ - class YAMLNode { + class DoctrineYAMLNode { /**#@+ * @access public * @var string @@ -43,7 +43,7 @@ * @access public * @return void */ - function YAMLNode($nodeId) { + function DoctrineYAMLNode($nodeId) { $this->id = $nodeId; } } @@ -57,12 +57,12 @@ * * Usage: * - * $parser = new Spyc; + * $parser = new DoctrineSpyc; * $array = $parser->load($file); * - * @package Spyc + * @package DoctrineSpyc */ - class Spyc { + class DoctrineSpyc { /** * Load YAML into a PHP array statically @@ -72,7 +72,7 @@ * simple. * Usage: * - * $array = Spyc::YAMLLoad('lucky.yaml'); + * $array = DoctrineSpyc::YAMLLoad('lucky.yaml'); * print_r($array); * * @access public @@ -80,7 +80,7 @@ * @param string $input Path of YAML file or string containing YAML */ function YAMLLoad($input) { - $spyc = new Spyc; + $spyc = new DoctrineSpyc; return $spyc->load($input); } @@ -105,7 +105,7 @@ * @param int $wordwrap Pass in 0 for no wordwrap, false for default (40) */ function YAMLDump($array,$indent = false,$wordwrap = false) { - $spyc = new Spyc; + $spyc = new DoctrineSpyc; return $spyc->dump($array,$indent,$wordwrap); } @@ -116,7 +116,7 @@ * will do its best to convert the YAML into a PHP array. Pretty simple. * Usage: * - * $parser = new Spyc; + * $parser = new DoctrineSpyc; * $array = $parser->load('lucky.yaml'); * print_r($array); * @@ -134,7 +134,7 @@ $yaml = explode("\n",$input); } // Initiate some objects and values - $base = new YAMLNode (1); + $base = new DoctrineYAMLNode (1); $base->indent = 0; $this->_lastIndent = 0; $this->_lastNode = $base->id; @@ -159,7 +159,7 @@ $last->data[key($last->data)] .= "\n"; } elseif ($ifchk{0} != '#' && substr($ifchk,0,3) != '---') { // Create a new node and get its indent - $node = new YAMLNode ($this->_nodeId); + $node = new DoctrineYAMLNode ($this->_nodeId); $this->_nodeId++; $node->indent = $this->_getIndent($line);