Esempio n. 1
0
 public static function import_data($file, $folder, $data = array())
 {
     self::_create_default_folder_xml_data(sys_get_xml(sys_custom($file), $data), $folder);
 }
Esempio n. 2
0
 private static function _get_data($file)
 {
     static $cache = array();
     if (isset($cache[$file])) {
         return $cache[$file];
     }
     if (sys_allowedpath(dirname($file)) != "") {
         return array();
     }
     if (is_dir($file) or !file_exists($file)) {
         return array();
     }
     $data = get_object_vars(sys_get_xml($file));
     foreach ($data as $key => $val) {
         if (is_array($val)) {
             $data[$key] = $val;
         } else {
             $data[$key] = array($val);
         }
     }
     $cache[$file] = $data;
     return $cache[$file];
 }