本文整理匯總了PHP中msg::show方法的典型用法代碼示例。如果您正苦於以下問題:PHP msg::show方法的具體用法?PHP msg::show怎麽用?PHP msg::show使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類msg
的用法示例。
在下文中一共展示了msg::show方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: alert
public static function alert($title, $content = '', $life = 0)
{
$msg = array();
$msg['type'] = 'alert';
$msg['title'] = empty($content) ? 'alert' : $title;
$msg['content'] = empty($content) ? $title : $content;
$msg['content'] = empty($content) ? $title : $content;
$msg['life'] = $life;
msg::show($msg);
}
示例2: success
/**
* 顯示成功消息
*
*/
public static function success($content = '', $url = '', $life = 2)
{
$msg = array('type' => 'success', 'title' => zotop::t('success'), 'content' => '', 'detail' => '', 'url' => $url, 'life' => $life, 'action' => '');
if (is_array($content)) {
$msg = array_merge($msg, $content, array('type' => 'success'));
} else {
$msg['content'] = $content;
}
msg::show($msg);
}
示例3: success
/**
* 顯示成功消息
*
*/
public static function success($content = '', $url = '', $life = 3, $extra = '')
{
$msg = array('type' => 'success', 'title' => 'success', 'content' => '', 'life' => 0);
if (is_array($content)) {
$msg = array_merge($msg, $content);
} else {
$msg['content'] = $content;
$msg['url'] = $url;
$msg['extra'] = $extra;
$msg['life'] = $life;
}
$msg['type'] = 'success';
msg::show($msg);
}