本文整理汇总了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();
}