本文整理汇总了PHP中Notifications::getAsJson方法的典型用法代码示例。如果您正苦于以下问题:PHP Notifications::getAsJson方法的具体用法?PHP Notifications::getAsJson怎么用?PHP Notifications::getAsJson使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Notifications
的用法示例。
在下文中一共展示了Notifications::getAsJson方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pageAddMessages
function pageAddMessages($smarty)
{
if (Config::get('debug/debug')) {
Notifications::addDebug('PHP Version: ' . PHP_VERSION, true);
Notifications::addDebug('Current Time: ' . date('H:i:s'), true);
Notifications::addDebug(Notifications::getAsJson(), true);
}
$smarty->assign('notifications_success', Session::flashRead('notifications-success'));
$smarty->assign('notifications_info', Session::flashRead('notifications-info'));
$smarty->assign('notifications_warning', Session::flashRead('notifications-warning'));
$smarty->assign('notifications_error', Session::flashRead('notifications-error'));
$smarty->assign('alerts_success', Session::flashRead('alerts-success'));
$smarty->assign('alerts_info', Session::flashRead('alerts-info'));
$smarty->assign('alerts_warning', Session::flashRead('alerts-warning'));
$smarty->assign('alerts_error', Session::flashRead('alerts-error'));
return $smarty;
}
示例2: Smarty
<?php
require_once 'app/core/init.php';
require_once 'main.php';
$smarty = new Smarty();
$smarty->debugging = Config::get('debug/smartyDebug');
$smarty->caching = Config::get('smarty/caching');
$smarty->cache_lifetime = Config::get('smarty/cache_lifetime');
$cache_id = md5(json_encode($_GET) . json_encode($_POST) . Notifications::getAsJson());
if (!$smarty->isCached('templates/errors/404.tpl', $cache_id)) {
$smarty = pageAddMain($smarty);
}
$smarty = pageAddMessages($smarty);
$smarty->loadFilter("output", "trimwhitespace");
$smarty->display('templates/errors/404.tpl', $cache_id);