本文整理汇总了PHP中core::var_dump方法的典型用法代码示例。如果您正苦于以下问题:PHP core::var_dump方法的具体用法?PHP core::var_dump怎么用?PHP core::var_dump使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core
的用法示例。
在下文中一共展示了core::var_dump方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cache_page
/**
* Page hit
* $cacher->cache_page($_SERVER['REQUEST_URI'], $this->lib('auth')->get_user());
*/
function cache_page($uri, $buffer)
{
if (!$this->_enabled) {
return false;
}
$hash = $this->_hash($uri);
core::dprint('cache_page - prepare ' . $uri . ' x ' . $hash);
// if cached item already loaded
if ($this->_cache_item) {
$item = $this->_cache_item;
} else {
$item = $this->get_by_hash($hash);
}
if ($item) {
$just_cached = false;
/*
array('hits' => 10, 'per' => '600', 'cache' => 180)
*/
if (!$item->is_cached()) {
$period = $item->access_time - $item->prev_access_time;
foreach ($this->_threshold_table as $row) {
if ($row['per'] <= $period && $row['hits'] - 1 <= $item->counter) {
// found rule
core::var_dump($row);
$this->_cache_page($item, $buffer, $row);
$just_cached = true;
break;
}
}
}
// already hitted
if (!$just_cached) {
$item->hit();
}
} else {
// new
$this->handle->create(array('url' => $uri, 'url_hash' => $hash));
}
}
示例2: defined
<?php
defined('IN_MAIN') or die;
core::dprint('Users crontab');
$last_time = (int) $this->get_core()->get_cfg_var('users_crontab_last');
$interval = $this->get_core()->get_cfg_var('users_crontab_interval', 3600 * 24 * 2);
$ses_interval = $this->get_core()->get_cfg_var('users_sessions_obsolete_time', 604800);
$ses_max = $this->get_core()->get_cfg_var('users_sessions_max', 256);
$time = time();
$interval = 1;
/*
core::var_dump( $last_time
, $interval
, $ses_interval
, $ses_max
, $time
);
*/
core::var_dump($last_time, $interval, $time);
if (empty($last_time) || $last_time + $interval < $time) {
/* do the job:
- clear obsolete sessions
*/
$sessions = $this->get_sessions_handle();
$sessions->fix_older($time - $ses_interval);
$sessions->fix_overload($ses_max);
$users = $this->get_users_handle();
$users->check_payd_users();
$this->get_core()->get_dyn_config()->update_param('users_crontab_last', $time);
}
示例3:
<?php
/**
* Post create/update method
* context: users controller
*
* @package TwoFace
* @author Golovkin Vladimir <r00t@skillz.ru> http://www.skillz.ru
* @copyright SurSoft (C) 2008
* @version $Id: vip.php,v 1.2 2008/05/22 07:58:07 surg30n Exp $
*/
if (!defined('IN_MAIN')) {
die;
}
$user = $this->get_context()->get_current_user();
core::var_dump($user->as_array());
示例4: suggestions
/**
* Suggest
*/
function suggestions()
{
core::var_dump('suggest');
//$this->get_context()->get_users_like()
}