diff --git a/src/utils/Spyc.php b/src/utils/Spyc.php index 5f9d4a571..e269e60d7 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. *