Permalink
Browse files

[Yaml] renamed load() to parse()

  • Loading branch information...
1 parent 6af9123 commit e9936264b274f1a4b11a8d4d62d817b20b9a987a @fabpot fabpot committed Jun 14, 2011
Showing with 7 additions and 7 deletions.
  1. +1 −1 Inline.php
  2. +2 −2 Parser.php
  3. +4 −4 Yaml.php
View
@@ -26,7 +26,7 @@ class Inline
*
* @return array A PHP array representing the YAML string
*/
- static public function load($value)
+ static public function parse($value)
{
$value = trim($value);
View
@@ -168,7 +168,7 @@ public function parse($value)
} else {
// 1-liner followed by newline
if (2 == count($this->lines) && empty($this->lines[1])) {
- $value = Inline::load($this->lines[0]);
+ $value = Inline::parse($this->lines[0]);
if (is_array($value)) {
$first = reset($value);
if (is_string($first) && '*' === substr($first, 0, 1)) {
@@ -350,7 +350,7 @@ private function parseValue($value)
return $this->parseFoldedScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), intval(abs($modifiers)));
}
- return Inline::load($value);
+ return Inline::parse($value);
}
/**
View
@@ -49,14 +49,14 @@ static public function getSpecVersion()
}
/**
- * Loads YAML into a PHP array.
+ * Parses YAML into a PHP array.
*
- * The load method, when supplied with a YAML stream (string or file),
+ * The parse method, when supplied with a YAML stream (string or file),
* will do its best to convert YAML in a file into a PHP array.
*
* Usage:
* <code>
- * $array = Yaml::load('config.yml');
+ * $array = Yaml::parse('config.yml');
* print_r($array);
* </code>
*
@@ -68,7 +68,7 @@ static public function getSpecVersion()
*
* @api
*/
- static public function load($input)
+ static public function parse($input)
{
$file = '';

0 comments on commit e993626

Please sign in to comment.