本文整理汇总了PHP中Wind::getAppName方法的典型用法代码示例。如果您正苦于以下问题:PHP Wind::getAppName方法的具体用法?PHP Wind::getAppName怎么用?PHP Wind::getAppName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wind
的用法示例。
在下文中一共展示了Wind::getAppName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例2: 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);
}
}
示例3: resolvedPath
/**
* 解析资源文件路径信息
*
* @param string $package
* @return string
*/
protected function resolvedPath($package)
{
$this->path || ($this->path = Wind::getRootPath(Wind::getAppName()));
$this->language || ($this->language = $this->getRequest()->getAcceptLanguage());
$path = $this->path . '/' . $this->language . '/' . strtolower($package);
$path = Wind::getRealDir(trim($path, '/'), true);
return $path;
}
示例4: getTokenName
/**
* token名称处理
*
* @param string $tokenName
* @return string
*/
protected function getTokenName($tokenName)
{
$tokenName || ($tokenName = Wind::getAppName());
return substr(md5('_token' . $tokenName . '_csrf'), -16);
}