else $done[$file] = 1;
if (!is_readable($file)) continue;
- if (preg_match('/\.(yaml|yml)$/i',$file) and ($yaml = self::yaml_parse_file($file))) {
+ if (preg_match('/\.(yaml|yml)$/i',$file) and ($yaml = self::yaml_decode_file($file))) {
self::$dbq = self::ar_merge(self::$dbq,$yaml);
} elseif (preg_match('/\.php$/i',$file)) {
*/
public static function object2array($o) { return $array = json_decode(json_encode($o), true); }
+ /*
+ * Function: yaml_init
+ */
private static function yaml_init() {
static $Spyc;
if (!isset($Spyc)) {
}
}
- public static function yaml_parse_file($file) {
+ public static function yaml_decode_file($file) {
self::yaml_init();
return _yaml_parse_file($file);
}
- /*
- * Function: yaml_encode
- */
public static function yaml_encode($row) {
self::yaml_init();
$yaml = _yaml_emit($row);