public function onCreate() { Wekit::createapp(Wind::getAppName()); $_debug = Wekit::C('site', 'debug'); if ($_debug == !Wind::$isDebug) { Wind::$isDebug = $_debug; } error_reporting($_debug ? E_ALL ^ E_NOTICE ^ E_DEPRECATED : E_ERROR | E_PARSE); set_error_handler(array($this->front, '_errorHandle'), error_reporting()); $this->_convertCharsetForAjax(); if ($components = Wekit::C('components')) { Wind::getApp()->getFactory()->loadClassDefinitions($components); } }
public function onCreate() { if (in_array(Wind::getAppName(), array('phpwind', 'pwadmin'))) { //云应用监听sql执行 WindFactory::_getInstance()->loadClassDefinitions(array('sqlStatement' => array('proxy' => 'WIND:filter.proxy.WindEnhancedClassProxy', 'listeners' => array('LIB:compile.acloud.PwAcloudDbListener')))); } if (!is_file(Wind::getRealPath('DATA:install.lock', true))) { Wind::getApp()->getResponse()->sendRedirect("install.php"); } Wekit::createapp(Wind::getAppName()); $_debug = Wekit::C('site', 'debug'); if ($_debug == !Wind::$isDebug) { Wind::$isDebug = $_debug; } if ('phpwind' == Wind::getAppName()) { error_reporting($_debug ? E_ALL ^ E_NOTICE ^ E_DEPRECATED : E_ERROR | E_PARSE); set_error_handler(array($this->front, '_errorHandle'), error_reporting()); } $this->_convertCharsetForAjax(); if ($components = Wekit::C('components')) { Wind::getApp()->getFactory()->loadClassDefinitions($components); } }
/** * 初始化框架 */ public static function init() { self::$isDebug = WIND_DEBUG; function_exists('date_default_timezone_set') && date_default_timezone_set('Etc/GMT+0'); self::register(WIND_PATH, 'WIND', true); if (!self::$_isAutoLoad) { return; } if (function_exists('spl_autoload_register')) { spl_autoload_register('Wind::autoLoad'); } else { self::$_isAutoLoad = false; } self::_loadBaseLib(); }