本文整理汇总了PHP中log::get方法的典型用法代码示例。如果您正苦于以下问题:PHP log::get方法的具体用法?PHP log::get怎么用?PHP log::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类log
的用法示例。
在下文中一共展示了log::get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetchStats
function fetchStats()
{
global $dbAccess;
require 'lib/log.php';
$db = new mysqli($dbAccess['host'], $dbAccess['user'], $dbAccess['pass'], $dbAccess['db']);
$log = new log($db);
$data = $log->get();
$min = array();
$max = array();
$midOver = 12;
$dateOf = 6;
$c = 0;
$set = array();
$setDate = false;
$lastDate = false;
foreach ($data as $item) {
$min[] = array($item['ts'], $item['min']);
$max[] = array($item['ts'], $item['max']);
}
return array($min, $max);
}
示例2: init
if (init('action') == 'restore') {
jeedom::restore(init('backup'), true);
ajax::success();
}
if (init('action') == 'restoreCloud') {
market::retoreBackup(init('backup'));
ajax::success();
}
if (init('action') == 'getUpdateLog') {
ajax::success(log::get('update', 0, 3000));
}
if (init('action') == 'getBackupLog') {
ajax::success(log::get('backup', 0, 3000));
}
if (init('action') == 'getRestoreLog') {
ajax::success(log::get('restore', 0, 3000));
}
if (init('action') == 'removeBackup') {
jeedom::removeBackup(init('backup'));
ajax::success();
}
if (init('action') == 'listBackup') {
ajax::success(jeedom::listBackup());
}
if (init('action') == 'getConfiguration') {
ajax::success(jeedom::getConfiguration(init('key'), init('default')));
}
if (init('action') == 'flushcache') {
cache::flush();
ajax::success();
}
示例3: date
}
$bakcup_name = 'backup-' . jeedom::version() . '-' . date("d-m-Y-H\\hi") . '.tar.gz';
$uploadfile = $uploaddir . '/' . $bakcup_name;
if (!move_uploaded_file($_file['tmp_name'], $uploadfile)) {
throw new Exception('Impossible de téléverser le fichier');
}
jeedom::restore($uploadfile, true);
$jsonrpc->makeSuccess('ok');
}
if ($jsonrpc->getMethod() == 'jeeNetwork::backup') {
jeedom::backup(true);
$jsonrpc->makeSuccess('ok');
}
/* * ************************Log*************************** */
if ($jsonrpc->getMethod() == 'log::get') {
$jsonrpc->makeSuccess(log::get($params['log'], $params['start'], $params['nbLine']));
}
if ($jsonrpc->getMethod() == 'log::list') {
$jsonrpc->makeSuccess(log::liste());
}
if ($jsonrpc->getMethod() == 'log::empty') {
$jsonrpc->makeSuccess(log::clear($params['log']));
}
if ($jsonrpc->getMethod() == 'log::remove') {
$jsonrpc->makeSuccess(log::remove($params['log']));
}
/* * ************************Messages*************************** */
if ($jsonrpc->getMethod() == 'message::removeAll') {
message::removeAll();
$jsonrpc->makeSuccess('ok');
}
示例4: init
}
if (init('action') == 'clear') {
log::clear(init('logfile'));
ajax::success();
}
if (init('action') == 'remove') {
log::remove(init('logfile'));
ajax::success();
}
if (init('action') == 'removeAll') {
log::removeAll();
ajax::success();
}
if (init('action') == 'get') {
if (init('jeeNetwork_id') != '') {
$jeeNetwork = jeeNetwork::byId(init('jeeNetwork_id'));
if (is_object($jeeNetwork)) {
$jeeNetwork->getLog(init('log'), init('start', 0), init('nbLine', 99999));
}
} else {
ajax::success(log::get(init('logfile'), init('start', 0), init('nbLine', 99999)));
}
}
if (init('action') == 'getNbLine') {
ajax::success(log::nbLine(init('logfile')));
}
throw new Exception(__('Aucune methode correspondante à : ', __FILE__) . init('action'));
/* * *********Catch exeption*************** */
} catch (Exception $e) {
ajax::error(displayExeption($e), $e->getCode());
}