本文整理汇总了PHP中Loader::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Loader::init方法的具体用法?PHP Loader::init怎么用?PHP Loader::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Loader
的用法示例。
在下文中一共展示了Loader::init方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
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();
}
示例2: basic
/** Basic initialization - preload settings and locales
* @return void
*/
public static function basic()
{
Loader::init();
Status::init();
Settings::init();
Locales::init();
Router::update_rewrite();
}
示例3: init
/**
* 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();
}
示例4: testClassNotExist
/**
* 类不存在
*
* @expectedException Exception
* @expectedExceptionMessage the class "ClassNotExist" is not found
*/
public function testClassNotExist()
{
Loader::init(array('Library/'), array('.class.php'));
$cl = new ClassNotExist();
}
示例5: fwrite
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();
示例6: Loader
<?php
include 'config.php';
include 'loader.php';
include 'api.php';
include 'database.php';
include 'message.php';
include 'json.php';
$loader = new Loader();
$loader->init();