public static function serialize($data) { self::$cache = serialize($data); return new static(); }
private function themelist_cache() { $dir = './Public/Tpl'; $list = array_slice(scandir($dir), 2); $themearray = array(); foreach ($list as $k => $v) { $t = File::cache('theme', '', $dir . '/' . $v . '/', false); $t['dirname'] = $v; $t['themename'] = empty($t['name']) ? $v : $t['name']; $t['themeurl'] = __ROOT__ . '/?theme=' . $v; $t['themelink'] = '<a href=\'' . $t['themeurl'] . '\'>' . $t['themename'] . '</a>'; $t['_default'] = $v == $GLOBALS['cfg_df_style'] ? 1 : 0; $themearray[$k] = $t; } F('themelist', $themearray, './Web/Runtime/Data/'); }