From 2f1e37ce6c0a6549a920d037270568470b95b47f Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Sun, 21 Apr 2013 22:29:44 +0200 Subject: [PATCH] Updated Spyc library --- src/utils/Spyc.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/utils/Spyc.php b/src/utils/Spyc.php index 5f9d4a57..e269e60d 100644 --- a/src/utils/Spyc.php +++ b/src/utils/Spyc.php @@ -10,6 +10,28 @@ * @package Spyc */ +if (!function_exists('spyc_load')) { + /** + * Parses YAML to array. + * @param string $string YAML string. + * @return array + */ + function spyc_load ($string) { + return Spyc::YAMLLoadString($string); + } +} + +if (!function_exists('spyc_load_file')) { + /** + * Parses YAML to array. + * @param string $file Path to YAML file. + * @return array + */ + function spyc_load_file ($file) { + return Spyc::YAMLLoad($file); + } +} + /** * The Simple PHP YAML Class. *