當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Wekit::createapp方法代碼示例

本文整理匯總了PHP中Wekit::createapp方法的典型用法代碼示例。如果您正苦於以下問題:PHP Wekit::createapp方法的具體用法?PHP Wekit::createapp怎麽用?PHP Wekit::createapp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Wekit的用法示例。


在下文中一共展示了Wekit::createapp方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: onCreate

 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);
     }
 }
開發者ID:ccq18,項目名稱:EduSoho,代碼行數:14,代碼來源:PwFrontFilters.php

示例2: run

 /**
  * 87升級到9更新緩存
  */
 public function run()
 {
     //$db = $this->_checkDatabase();
     Wekit::createapp('phpwind');
     //更新HOOK配置數據
     Wekit::load('hook.srv.PwHookRefresh')->refresh();
     //初始化站點config
     $site_hash = WindUtility::generateRandStr(8);
     $cookie_pre = WindUtility::generateRandStr(3);
     Wekit::load('config.PwConfig')->setConfig('site', 'hash', $site_hash);
     Wekit::load('config.PwConfig')->setConfig('site', 'cookie.pre', $cookie_pre);
     Wekit::load('config.PwConfig')->setConfig('site', 'info.url', PUBLIC_URL);
     Wekit::load('nav.srv.PwNavService')->updateConfig();
     //風格默認數據
     Wekit::load('APPCENTER:service.srv.PwStyleInit')->init();
     //計劃任務默認數據
     Wekit::load('cron.srv.PwCronService')->updateSysCron();
     //版塊的統計數據更新
     /* @var $forumMisc PwForumMiscService */
     $forumMisc = Wekit::load('forum.srv.PwForumMiscService');
     $forumMisc->correctData();
     $forumMisc->countAllForumStatistics();
     //更新數據緩存
     /* @var $usergroup PwUserGroupsService */
     $usergroup = Wekit::load('SRV:usergroup.srv.PwUserGroupsService');
     $usergroup->updateLevelCache();
     $usergroup->updateGroupCache();
     $usergroup->updateGroupRightCache();
     /* @var $emotion PwEmotionService */
     $emotion = Wekit::load('SRV:emotion.srv.PwEmotionService');
     $emotion->updateCache();
     //門戶演示數據
     Wekit::load('SRV:design.srv.PwDesignDefaultService')->likeModule();
     Wekit::load('SRV:design.srv.PwDesignDefaultService')->tagModule();
     Wekit::load('SRV:design.srv.PwDesignDefaultService')->reviseDefaultData();
     //全局緩存更新
     Wekit::load('SRV:cache.srv.PwCacheUpdateService')->updateConfig();
     Wekit::load('SRV:cache.srv.PwCacheUpdateService')->updateMedal();
     $this->_writeWindid();
     $this->_designUpgrade();
     //清理升級過程的文件
     //		WindFile::del(Wind::getRealPath('DATA:setup.setup_config.php', true));
     // 		WindFile::del(Wind::getRealPath('DATA:setup.tmp_dbsql.php', true));
     $this->setTemplate('upgrade_finish');
 }
開發者ID:chendong0444,項目名稱:phpwind,代碼行數:48,代碼來源:UpgradeController.php

示例3: beforeAction

 public function beforeAction($handlerAdapter)
 {
     if ('finish' != $handlerAdapter->getAction()) {
         Wekit::createapp('install');
     }
     //ajax遞交編碼轉換
     if ($this->getRequest()->getIsAjaxRequest()) {
         $toCharset = $this->getResponse()->getCharset();
         if (strtoupper(substr($toCharset, 0, 2)) != 'UT') {
             $_tmp = array();
             foreach ($_POST as $key => $value) {
                 $key = WindConvert::convert($key, $toCharset, 'UTF-8');
                 $_tmp[$key] = WindConvert::convert($value, $toCharset, 'UTF-8');
             }
             $_POST = $_tmp;
         }
     }
     $_consts = (include Wind::getRealPath('CONF:publish.php', true));
     foreach ($_consts as $const => $value) {
         if (defined($const)) {
             continue;
         }
         if ($const === 'PUBLIC_URL' && !$value) {
             $value = Wind::getApp()->getRequest()->getBaseUrl(true);
         }
         define($const, $value);
     }
     $url = array();
     $url['base'] = PUBLIC_URL;
     $url['res'] = WindUrlHelper::checkUrl(PUBLIC_RES, PUBLIC_URL);
     $url['css'] = WindUrlHelper::checkUrl(PUBLIC_RES . '/css/', PUBLIC_URL);
     $url['images'] = WindUrlHelper::checkUrl(PUBLIC_RES . '/images/', PUBLIC_URL);
     $url['js'] = WindUrlHelper::checkUrl(PUBLIC_RES . '/js/dev/', PUBLIC_URL);
     $url['attach'] = WindUrlHelper::checkUrl(PUBLIC_ATTACH, PUBLIC_URL);
     Wekit::setGlobal($url, 'url');
     $this->setOutput(NEXT_VERSION, 'wind_version');
     WindFile::isFile($this->_getInstallLockFile()) && $this->showError('INSTALL:have_install_lock');
 }
開發者ID:sanzhumu,項目名稱:nextwind,代碼行數:38,代碼來源:IndexController.php

示例4: onCreate

 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);
     }
 }
開發者ID:fanqimeng,項目名稱:4tweb,代碼行數:23,代碼來源:PwFrontFilters.php

示例5: error_reporting

<?php

error_reporting(0);
@header("Content-Type:text/html; charset=utf-8");
define('SCR', 'aCloud_index');
define('WIND_DEBUG', 0);
require_once '.././src/wekit.php';
$front = Wind::application('acloud', WEKIT_PATH . 'aCloud/aCloudConfig.php');
// $front->createApplication();
Wekit::createapp('acloud');
$config = (include WEKIT_PATH . '../conf/application/default.php');
Wekit::app()->charset = $config['web-apps']['default']['charset'];
require_once WEKIT_PATH . 'aCloud/aCloud.php';
$router = new ACloudRouter();
$router->run();
開發者ID:fanqimeng,項目名稱:4tweb,代碼行數:15,代碼來源:index.php

示例6: error_reporting

if (!defined('WEKIT_VERSION')) {
    error_reporting(E_ERROR | E_PARSE);
    require_once WINDID_BOOT . '../wekit.php';
    Wekit::init('windidclient');
    Wind::application('windidclient', Wekit::S());
    $database = (include WINDID_BOOT . 'conf/database.php');
    $windidConfig = (include Wind::getRealPath('WINDID:conf.config.php', true));
    Wind::register(WINDID_PATH . 'service', 'SRV');
} else {
    $windidConfig = Wekit::C('windid');
    if ($windidConfig['windid'] == 'local') {
        $database = Wind::getComponent('db')->getConfig();
        $database['tableprefix'] .= 'windid_';
        $windidConfig['connect'] = 'db';
    } else {
        $database = array('dsn' => 'mysql:host=' . $windidConfig['db.host'] . ';dbname=' . $windidConfig['db.name'] . ';port=' . $windidConfig['db.port'], 'user' => $windidConfig['db.user'], 'pwd' => $windidConfig['db.pwd'], 'charset' => $windidConfig['db.charset'], 'tableprefix' => $windidConfig['db.prefix']);
    }
    $windidConfig['charset'] = Wekit::V('charset');
}
Wind::register(WINDID_PATH . 'service', 'WSRV');
Wind::import('WSRV:base.WindidBaseDao');
Wind::import('WSRV:base.WindidUtility');
Wind::import('WSRV:base.WindidError');
Wind::registeComponent(array('path' => 'WIND:db.WindConnection', 'config' => $database), 'windiddb', 'singleton');
define('WINDID_CONNECT', $windidConfig['connect']);
define('WINDID_SERVER_URL', $windidConfig['serverUrl']);
define('WINDID_CLIENT_ID', $windidConfig['clientId']);
define('WINDID_CLIENT_KEY', $windidConfig['clientKey']);
define('WINDID_CLIENT_CHARSET', $windidConfig['charset']);
Wekit::createapp('windidclient', 'windid');
開發者ID:chendong0444,項目名稱:phpwind,代碼行數:30,代碼來源:bootstrap.php

示例7: finishAction

 /**
  * 安裝完成
  */
 public function finishAction()
 {
     Wekit::createapp('phpwind');
     $db = $this->_checkDatabase();
     //更新HOOK配置數據
     Wekit::load('hook.srv.PwHookRefresh')->refresh();
     //初始化站點config
     $site_hash = WindUtility::generateRandStr(8);
     $cookie_pre = WindUtility::generateRandStr(3);
     Wekit::load('config.PwConfig')->setConfig('site', 'hash', $site_hash);
     Wekit::load('config.PwConfig')->setConfig('site', 'cookie.pre', $cookie_pre);
     Wekit::load('config.PwConfig')->setConfig('site', 'info.mail', $db['founder']['manager_email']);
     Wekit::load('config.PwConfig')->setConfig('site', 'info.url', PUBLIC_URL);
     Wekit::load('nav.srv.PwNavService')->updateConfig();
     //風格默認數據
     Wekit::load('APPS:appcenter.service.srv.PwStyleInit')->init();
     //計劃任務默認數據
     Wekit::load('cron.srv.PwCronService')->updateSysCron();
     //更新數據緩存
     /* @var $usergroup PwUserGroupsService */
     $usergroup = Wekit::load('SRV:usergroup.srv.PwUserGroupsService');
     $usergroup->updateLevelCache();
     $usergroup->updateGroupCache(range(1, 16));
     $usergroup->updateGroupRightCache();
     /* @var $emotion PwEmotionService */
     $emotion = Wekit::load('SRV:emotion.srv.PwEmotionService');
     $emotion->updateCache();
     //創始人配置
     $uid = $this->_writeFounder($db['founder']['manager'], $db['founder']['manager_pwd'], $db['founder']['manager_email']);
     //門戶演示數據
     Wekit::load('SRV:design.srv.PwDesignDefaultService')->likeModule();
     Wekit::load('SRV:design.srv.PwDesignDefaultService')->tagModule();
     Wekit::load('SRV:design.srv.PwDesignDefaultService')->reviseDefaultData();
     //演示數據導入
     Wind::import('SRV:forum.srv.PwPost');
     Wind::import('SRV:forum.srv.post.PwTopicPost');
     $pwPost = new PwPost(new PwTopicPost(2, new PwUserBo($uid)));
     $threads = $this->_getDemoThreads();
     foreach ($threads as $thread) {
         $postDm = $pwPost->getDm();
         $postDm->setTitle($thread['title'])->setContent($thread['content']);
         $result = $pwPost->execute($postDm);
     }
     //全局緩存更新
     Wekit::load('SRV:cache.srv.PwCacheUpdateService')->updateConfig();
     Wekit::load('SRV:cache.srv.PwCacheUpdateService')->updateMedal();
     //清理安裝過程的文件
     WindFile::write($this->_getInstallLockFile(), 'LOCKED');
     WindFile::del($this->_getTempFile());
     WindFile::del($this->_getTableLogFile());
     WindFile::del($this->_getTableSqlFile());
 }
開發者ID:fanqimeng,項目名稱:4tweb,代碼行數:55,代碼來源:IndexController.php


注:本文中的Wekit::createapp方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。