/** * アプリケーションXMLのひな形の作成 * -app [index] */ public static function __setup_app__(Request $req, $value) { if (empty($value)) { $value = "index"; } $path = str_replace("\\", "/", getcwd()) . "/" . $value . ".php"; if (is_file($path)) { throw new InvalidArgumentException($path . ": File exists"); } File::write($path, "<?php require dirname(__FILE__).\"/__settings__.php\"; app(); ?>\n" . "<app name=\"application name\" summary=\"summary\">\n" . "\t<description>description</description>\n" . "\t<handler>\n" . "\t<map url=\"\" template=\"index.html\" summary=\"map summary\" />\n" . "\t</handler>\n" . "</app>\n"); self::info_print('write ' . $path); if ($req->is_vars('htaccess')) { $req->vars('add', $value); self::__setup_htaccess__($req, $req->in_vars('htaccess')); } }
static function initialize() { self::$vars = $_REQUEST; }