/** * Load a string of YAML into a PHP array statically * * The load method, when supplied with a YAML string, will do its best * to convert YAML in a string into a PHP array. Pretty simple. * * Note: use this function if you don't want files from the file system * loaded and processed as YAML. This is of interest to people concerned * about security whose input is from a string. * * Usage: * <code> * $array = Spyc::yamlLoadString("---\n0: hello world\n"); * print_r($array); * </code> * * @param [string] $input String containing YAML * @return [array] $array */ public static function yamlLoadString($input) { $spyc = new Spyc(); $array = $spyc->_loadString($input); return $array; }