Ejemplo n.º 1
0
 public static function run()
 {
     require_once 'library/Smarty/Smarty.class.php';
     require_once 'core/Loader.class.php';
     date_default_timezone_set("Asia/Shanghai");
     Loader::init();
     Factory::run();
 }
Ejemplo n.º 2
0
 /** Basic initialization - preload settings and locales
  * @return void
  */
 public static function basic()
 {
     Loader::init();
     Status::init();
     Settings::init();
     Locales::init();
     Router::update_rewrite();
 }
Ejemplo n.º 3
0
 /**
  * App init
  * @access public
  * @static
  */
 public static function init()
 {
     self::importCore();
     ProjectConfiguration::init();
     date_default_timezone_set(ProjectConfiguration::getConfig('timezone'));
     self::initLog();
     set_error_handler('App::errorHandler', ProjectConfiguration::getConfig('error_level'));
     Loader::init();
     self::$mControllerAndParams = Loader::getControllerFromUrlObject();
     self::$mTemplateObj = PHPTemplate::getInstance();
 }
Ejemplo n.º 4
0
 /**
  * 类不存在
  *
  * @expectedException        Exception
  * @expectedExceptionMessage the class "ClassNotExist" is not found
  */
 public function testClassNotExist()
 {
     Loader::init(array('Library/'), array('.class.php'));
     $cl = new ClassNotExist();
 }
Ejemplo n.º 5
0
            fwrite($file, file_get_contents($frameworks[$framework][0]));
            fclose($file);
            echo "\n" . $frameworks[$framework][1] . " has been added!\n\n";
            // List the JS frameworks
        } elseif ($framework == 'list') {
            echo "\n";
            $output = '';
            foreach ($frameworks as $name => $data) {
                $output .= $name . '|';
            }
            $output = rtrim($output, '|');
            return '[' . $output . ']';
            // 	Framework was not found
        } else {
            echo "\nInvalid javascript framework.\nPlease use one from below.\n./script/load javascript " . self::javascript('list') . "\n\n";
        }
    }
    private static function url($location)
    {
        switch ($location) {
            case 'javascripts':
                return BASE_PATH . '/../public/javascripts';
                break;
            default:
                return false;
                break;
        }
    }
}
Loader::init();
Ejemplo n.º 6
0
<?php

include 'config.php';
include 'loader.php';
include 'api.php';
include 'database.php';
include 'message.php';
include 'json.php';
$loader = new Loader();
$loader->init();