本文整理汇总了PHP中Wekit::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Wekit::init方法的具体用法?PHP Wekit::init怎么用?PHP Wekit::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wekit
的用法示例。
在下文中一共展示了Wekit::init方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: routerShutdown
public function routerShutdown(Yaf\Request_Abstract $request, Yaf\Response_Abstract $response)
{
if ($request->controller == 'Api') {
require \Yaf\Registry::get('config')->application->phpwind->wekit_bin;
Wekit::init('phpwind');
$application = Wind::application('phpwind', Wekit::S());
}
}
示例2: _loadBase
* @return void
*/
protected static function _loadBase()
{
Wind::import('WIND:utility.WindFolder');
Wind::import('WIND:utility.WindJson');
Wind::import('WIND:utility.WindFile');
Wind::import('WIND:utility.WindValidator');
Wind::import('WIND:utility.WindCookie');
Wind::import('WIND:utility.WindSecurity');
Wind::import('WIND:utility.WindString');
Wind::import('WIND:utility.WindConvert');
Wind::import('LIB:base.*');
Wind::import('LIB:engine.extension.viewer.*');
Wind::import('LIB:engine.component.*');
Wind::import('LIB:engine.error.*');
Wind::import('LIB:engine.exception.*');
Wind::import('LIB:engine.hook.*');
Wind::import('LIB:Pw');
Wind::import('LIB:PwLoader');
Wind::import('LIB:filter.PwFrontFilters');
Wind::import('SRV:cache.PwCache');
Wind::import('SRV:config.bo.PwConfigBo');
Wind::import('SRV:config.srv.PwConfigSet');
Wind::import('WINDID:library.Windid');
Wind::import('WINDID:WindidApi');
Wind::import('SRV:user.bo.PwUserBo');
}
}
Wekit::init();
示例3: error_reporting
<?php
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']);
示例4: error_reporting
<?php
error_reporting(0);
define('BOOT_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
@header("Content-Type:text/html; charset=utf-8");
define('SCR', 'aCloud_index');
define('WIND_DEBUG', 0);
require_once '../../src/wekit.php';
Wekit::init('acloud');
$front = Wind::application('acloud', WEKIT_PATH . 'aCloud/aCloudConfig.php');
// $front->createApplication();
Wekit::createapp('acloud');
$config = (include WEKIT_PATH . '../conf/application/default.php');
Wekit::setV('charset', $config['web-apps']['default']['charset']);
require_once WEKIT_PATH . 'aCloud/aCloud.php';
$router = new ACloudRouter();
$router->run();