$manage), self::$content); } self::content($file); if (isset(self::$content['manage'])) { \Dever::load('menu', 'manage')->init(); } } if (empty(self::$content[DEVER_APP_NAME]['lang'])) { self::$content[DEVER_APP_NAME]['lang'] = DEVER_APP_LANG; self::content($file); } } public static function write($host, $name) { $dir = DEVER_PROJECT_PATH . $name . '/'; if (is_dir($dir)) { $data = scandir($dir); foreach ($data as $v) { if (empty(self::$content[$v]) && is_dir($dir . '/' . $v) && $v !== '.' && $v !== '..') { if (is_file($dir . $v . '/index.php')) { $k = $name . '/' . $v . '/'; self::$content[$v] = array(); if (strstr($name, 'package')) { if (strstr($name, 'package/manage')) { unset(self::$content[$v]); $v = 'manage'; self::$content[$v] = array(); self::$content[$v]['path'] = DEVER_PATH . $name . '/'; } elseif($v == 'manage') { self::$content[$v]['path'] = DEVER_PATH . $k; $k .= 'api/'; } else { self::$content[$v]['path'] = DEVER_PATH . $k; } self::$content[$v]['setup'] = DEVER_PROJECT_PATH . $k; } else { self::$content[$v]['path'] = DEVER_PROJECT_PATH . $k; } self::$content[$v]['url'] = $host . $k; } else { self::write($host, $name . '/' . $v); } } } } } public static function content($file) { file_put_contents($file, '