本文整理汇总了PHP中core::getConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP core::getConfig方法的具体用法?PHP core::getConfig怎么用?PHP core::getConfig使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core
的用法示例。
在下文中一共展示了core::getConfig方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: info
public static function info($info = '', $hashkey = '', $type = 'info')
{
if ($info == '') {
return false;
}
$execTime = self::getFomatTime();
$time = self::getTime();
$newHashkey = md5($time . $info);
if ($hashkey != '' && isset(self::$hashkeyTimeline[$hashkey])) {
$execTime = self::getFomatTime(self::$hashkeyTimeline[$hashkey], $time);
} else {
self::$hashkeyTimeline[$newHashkey] = $time;
}
$debugInfo = array('info' => $info, 'time' => $execTime, 'memory' => self::getSizeUsage(memory_get_usage()));
if (strpos(PHP_SAPI, 'cli') === true) {
if (core::getConfig('core_debug') == true) {
echo $debugInfo['info'] . ' (Time: ' . $debugInfo['time'] . ' , Memory: ' . $debugInfo['memory'] . ")\n";
}
} else {
if ($type == 'info') {
self::$info[$newHashkey] = $debugInfo;
}
}
return $newHashkey;
}
示例2: __setdefine
private function __setdefine()
{
define('STATIC_DIR', core::getConfig('web_dir') . '/static');
$this->assign('STATIC_DIR', STATIC_DIR);
$this->assign('_GET', $this->get);
$this->assign('_POST', $this->post);
}
示例3: __construct
/**
* 构造函数
*
* @return void
*/
public function __construct()
{
if (!$this->dbConfig) {
$this->dbConfig = core::getConfig('db_config');
}
$this->adapter = core_database_factory::getInstance('pdo', $this->dbConfig);
$this->cache = core_cache_factory::getInstance('filesystem');
}
示例4: getRender
public function getRender()
{
$render = core::instance('core_template');
$render->template_dir = core::getConfig('template_dir');
$render->compile_dir = core::getConfig('compile_dir');
$render->tpl_left_delim = core::getConfig('tpl_left_delim');
$render->tpl_right_delim = core::getConfig('tpl_right_delim');
return $render;
}
示例5: __construct
public function __construct($params = array())
{
if (!isset($params['cache_dir']) || !$this->getInstance()->isDir($params['cache_dir'])) {
$this->savepath = core::getConfig('cache_filesystem_dir');
} else {
$this->savepath = $params['cache_dir'];
}
core_debug::info('set filesystem dir: ' . $this->getSavePath());
}
示例6:
Created on: 2016-01-27 13:56:50
*/
$this->checkCompile('index.html', 'd1c750356963cfc3405c170e6d3fb335', '1453874210');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<link rel="stylesheet" href="<?php
echo core::getConfig('app_dir');
?>
/data/static/default/css/style.css">
<script src="<?php
echo core::getConfig('app_dir');
?>
/data/static/default/js/jquery-1.9.1.js"></script>
</head>
<body>
<table cellpadding="0" cellspacing="0" class="table-list" style='width:100%;'>
<thead>
<tr>
<th>ID</th>
<th>脚本名称</th>
<th>状态</th>
<th>下次运行时间</th>
</tr>
</thead>
示例7: __construct
public function __construct()
{
$this->render = core::instance('core_page')->getRender();
$this->render->template_dir = core::getConfig('widget_dir');
$this->render->mark = 'widget';
}