本文整理匯總了PHP中factory::init方法的典型用法代碼示例。如果您正苦於以下問題:PHP factory::init方法的具體用法?PHP factory::init怎麽用?PHP factory::init使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類factory
的用法示例。
在下文中一共展示了factory::init方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: init
/**
* Initialize nyro
*/
private static function init() {
if (!self::$cfg) {
factory::init();
if (DEV) {
debug::timer('nyro');
debug::timer('nyroProcess');
}
request::init();
self::$cfg = new config(factory::loadCfg(__CLASS__));
file::init();
session::initFlash();
}
}
示例2: autoLoader
<?php
require_once 'system/settings.php';
require_once 'system/autoLoader.php';
require_once 'system/factory.php';
require_once 'system/controller.php';
require_once 'system/model.php';
require_once 'system/authentication.php';
require_once 'system/normalize.php';
require_once 'system/request.php';
require_once 'app/config/routes.php';
$autoloader = new autoLoader(unserialize(AUTOLOAD));
$app = new factory();
$normalize = new normalize();
$request = new request();
try {
//$auth = new authentication($routesPublic);
$app->normalize = $normalize;
$app->request = $request;
$app->init($routes);
} catch (Exception_404 $e) {
echo 'Page not found<br>' . $e->getMessage();
} catch (Exception_Jwt $e) {
echo 'JWT -> ' . $e->getMessage();
} catch (Exception $e) {
echo $e->getMessage();
}