當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FlashMessages::getMessages方法代碼示例

本文整理匯總了PHP中Fisharebest\Webtrees\FlashMessages::getMessages方法的典型用法代碼示例。如果您正苦於以下問題:PHP FlashMessages::getMessages方法的具體用法?PHP FlashMessages::getMessages怎麽用?PHP FlashMessages::getMessages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Fisharebest\Webtrees\FlashMessages的用法示例。


在下文中一共展示了FlashMessages::getMessages方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: bodyHeaderPopupWindow

 /** {@inheritdoc} */
 public function bodyHeaderPopupWindow()
 {
     if (Filter::get('action') === 'addnewnote_assisted') {
         $class = 'class="census-assistant"';
     } else {
         $class = '';
     }
     return '<body class="container container-popup">' . '<main id="content"' . $class . '">' . $this->flashMessagesContainer(FlashMessages::getMessages());
 }
開發者ID:bxbroze,項目名稱:justlight,代碼行數:10,代碼來源:theme.php

示例2: realpath

// This script does not load session.php.
// session.php won’t run until a configuration file and database connection exist...
// This next block of code is a minimal version of session.php
define('WT_WEBTREES', 'webtrees');
define('WT_BASE_URL', '');
define('WT_ROOT', '');
define('WT_DATA_DIR', realpath('data') . DIRECTORY_SEPARATOR);
define('WT_MODULES_DIR', 'modules_v3/');
require 'vendor/autoload.php';
Session::start();
define('WT_LOCALE', I18N::init());
http_response_code(503);
header('Content-Type: text/html; charset=UTF-8');
// The page which redirected here may have provided an error message.
$messages = '';
foreach (FlashMessages::getMessages() as $message) {
    $messages .= '<blockquote>' . Filter::escapeHtml($message->text) . '</blockquote>';
}
// If we can't connect to the database at all, give the reason why
$config_ini_php = file_exists('data/config.ini.php') && parse_ini_file('data/config.ini.php');
if (is_array($config_ini_php) && array_key_exists('dbhost', $config_ini_php) && array_key_exists('dbport', $config_ini_php) && array_key_exists('dbuser', $config_ini_php) && array_key_exists('dbpass', $config_ini_php) && array_key_exists('dbname', $config_ini_php)) {
    try {
        new PDO('mysql:host=' . $config_ini_php['dbhost'] . ';port=' . $config_ini_php['dbport'] . ';dbname=' . $config_ini_php['dbname'], $config_ini_php['dbuser'], $config_ini_php['dbpass'], array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_CASE => PDO::CASE_LOWER, PDO::ATTR_AUTOCOMMIT => true));
    } catch (PDOException $ex) {
        $messages .= '<p>' . I18N::translate('The database reported the following error message:') . '</p>';
        $messages .= '<blockquote>' . $ex->getMessage() . '</blockquote>';
    }
}
?>
<!DOCTYPE html>
<html <?php 
開發者ID:pal-saugstad,項目名稱:webtrees,代碼行數:31,代碼來源:site-unavailable.php

示例3: headerSimple

 /**
  * Create the <header> tag for a popup window.
  *
  * @return string
  */
 protected function headerSimple()
 {
     return $this->flashMessagesContainer(FlashMessages::getMessages()) . '<div id="content">';
 }
開發者ID:tronsmit,項目名稱:webtrees,代碼行數:9,代碼來源:AbstractTheme.php


注:本文中的Fisharebest\Webtrees\FlashMessages::getMessages方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。