public static function app($app, $controller = null, $action = null)
 {
     self::try_define('APP', $app);
     self::try_define('CONTROLLER', $controller);
     self::try_define('ACTION', $action);
     moojon_files::attempt_mkdir(moojon_paths::get_project_apps_directory());
     self::run(moojon_paths::get_moojon_templates_directory() . 'app.template', moojon_paths::get_project_apps_directory() . APP . '.app.class.php', array('app' => APP), false, true);
     self::environment_app_config('development', APP);
     self::environment_app_config('production', APP);
     self::environment_app_config('testing', APP);
     if ($controller) {
         self::controller(APP, $controller, $action);
     }
     self::layout(APP);
 }
 public static function get_project_apps()
 {
     $return = array();
     foreach (moojon_files::directory_files(moojon_paths::get_project_apps_directory(), false, false) as $app) {
         $return[] = str_replace('.app.class.php', '', $app);
     }
     return $return;
 }