本文整理匯總了PHP中Messages::messages方法的典型用法代碼示例。如果您正苦於以下問題:PHP Messages::messages方法的具體用法?PHP Messages::messages怎麽用?PHP Messages::messages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Messages
的用法示例。
在下文中一共展示了Messages::messages方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: merge
public static function merge($message_array)
{
if (!is_array(self::$messages)) {
self::$messages = $message_array;
}
if (is_array($message_array)) {
self::$messages = array_merge(self::$messages, $message_array);
}
}
示例2: Securimage
if (empty($CFG->google_recaptch_api_key) || empty($CFG->google_recaptch_api_secret)) {
include_once 'securimage/securimage.php';
$securimage = new Securimage();
$captcha_error = empty($_REQUEST['forgot']['captcha']) || !$securimage->check($_REQUEST['forgot']['captcha']);
} else {
$captcha = new Form('captcha');
$captcha->reCaptchaCheck(1);
if (!empty($captcha->errors) && is_array($captcha->errors)) {
$captcha_error = true;
Errors::add($captcha->errors['recaptcha']);
}
}
if (!$captcha_error) {
API::add('User', 'resetUser', array($email1));
$query = API::send();
Messages::$messages = array();
Messages::add(Lang::string('login-password-sent-message'));
} else {
Errors::add(Lang::string('login-capcha-error'));
}
}
$_SESSION["forgot_uniq"] = md5(uniqid(mt_rand(), true));
include 'includes/head.php';
?>
<div class="page_title">
<div class="container">
<div class="title"><h1><?php
echo Lang::string('login-forgot');
?>
</h1></div>
<div class="pagenation"> <a href="index.php"><?php
示例3: array
if (!empty($_REQUEST['contact']) && is_array($contact->errors)) {
$errors = array();
foreach ($contact->errors as $key => $error) {
if (stristr($error, 'login-required-error')) {
$errors[] = Lang::string('settings-' . str_replace('_', '-', $key)) . ' ' . Lang::string('login-required-error');
} elseif (strstr($error, '-')) {
$errors[] = Lang::string($error);
} else {
$errors[] = $error;
}
}
Errors::$errors = $errors;
} elseif (!empty($_REQUEST['contact']) && !is_array($contact->errors)) {
API::add('SiteEmail', 'contactForm', array($contact->info));
$query = API::send();
Messages::$messages = array(Lang::string('contact-message'));
$show_message = true;
$show_mask = true;
}
$_SESSION["contact_uniq"] = md5(uniqid(mt_rand(), true));
include 'includes/head.php';
?>
<div class="page_title">
<div class="container">
<div class="title"><h1><?php
echo $page_title;
?>
</h1></div>
<div class="pagenation"> <a href="<?php
echo Lang::url('index.php');
?>
示例4: clearMessages
public static function clearMessages()
{
self::$messages = array();
}