mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
Updated Spyc library
This commit is contained in:
parent
80488784f9
commit
2f1e37ce6c
1 changed files with 22 additions and 0 deletions
|
|
@ -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.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue