Esempio n. 1
0
 /**
  * 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>
  * @access public
  * @return array
  * @param string $input String containing YAML
  */
 public static function YAMLLoadString($input)
 {
     $Spyc = new Spyc();
     return $Spyc->loadString($input);
 }