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


PHP Messages::get方法代碼示例

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


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

示例1: display_home

 public function display_home()
 {
     $params = array();
     if (isset($_GET['criteria'])) {
         $params['criteria'] = $_GET['criteria'];
         $this->template->criteria = $_GET['criteria'];
     }
     if (isset($_GET['page'])) {
         $params['page'] = $_GET['page'];
         $this->template->page = $_GET['page'];
     }
     if (isset($_GET['dates'])) {
         // @todo convert this into a usable format for Messages::get()
         $params['dates'] = $_GET['dates'];
         $this->template->date = $_GET['dates'];
     }
     if (isset($_GET['sender'])) {
         $params['sender'] = $_GET['sender'];
         $this->template->sender = $_GET['sender'];
     }
     $this->template->messages = Messages::get($params);
     $this->template->pager = Logbox::paginate('Messages', $params, 'http://logbox.localhost/');
     // retrieve senders for the select filter
     $senders = DB::connect()->query('SELECT DISTINCT sender FROM message ORDER BY sender ASC')->fetchAll(PDO::FETCH_COLUMN);
     $this->template->senders = $senders;
     // retrieve dates for the select filter
     $dates = DB::connect()->query('SELECT UNIX_TIMESTAMP(sent_at) FROM message ORDER BY sent_at DESC')->fetchAll(PDO::FETCH_COLUMN);
     $dates = array_map(create_function('$date', 'return date("F Y", $date);'), $dates);
     $dates = array_unique($dates);
     $this->template->dates = $dates;
     $this->template->display('home.php');
 }
開發者ID:ahutchings,項目名稱:logbox,代碼行數:32,代碼來源:SiteHandler.php

示例2: testMessagesRespectFormat

 /**
  * Test the Messages::get method.
  *
  * @group laravel
  */
 public function testMessagesRespectFormat()
 {
     $this->messages->add('email', 'test');
     $this->assertEquals('<p>test</p>', $this->messages->first('email', '<p>:message</p>'));
     $this->assertEquals(array('<p>test</p>'), $this->messages->get('email', '<p>:message</p>'));
     $this->assertEquals(array('<p>test</p>'), $this->messages->all('<p>:message</p>'));
 }
開發者ID:gilyaev,項目名稱:framework-bench,代碼行數:12,代碼來源:messages.test.php

示例3: get

 public function get($lastMessageId)
 {
     if (Fari_Filter::isInt($lastMessageId)) {
         // get is the freshest messages
         $newMessages = Messages::get($lastMessageId);
         // handle with JSON
         echo json_encode($newMessages);
     }
 }
開發者ID:radekstepan,項目名稱:zenchat,代碼行數:9,代碼來源:shoutbox.php

示例4: run

 public function run($form)
 {
     $this->load('10%');
     $lang = Messages::$PT_br;
     $this->load('30%');
     $usr_name = SessionManager::getUser()->getNome();
     $this->load('50%');
     SessionManager::cleanUser();
     $this->load('70%');
     SessionManager::clean();
     $this->load('90%');
     $this->setMessage(str_replace(":usr", $usr_name, Messages::get($lang, Messages::$MSG_USUARIO_DESLOGADO)), Constants::$_MSG_SUCCESS);
     $this->load('100%');
     $this->setForward(HomePage::$NM_PAGINA);
 }
開發者ID:vagnerbarros,項目名稱:kcilc-projeto,代碼行數:15,代碼來源:LogoutAction.php

示例5: getMessages

 /**
  * Returns any error messages that are generated
  *
  * @return array
  */
 public function getMessages()
 {
     return $this->_messages->get();
 }
開發者ID:mothership-ec,項目名稱:cog,代碼行數:9,代碼來源:Validator.php

示例6:

			<a href="/"></a>
		</div>
		<div>&nbsp;</div>
	</header>

	<div class="wrapper">
		<div class="content">
			<div class="content_inner">
				<h1>Авторизация</h1>
				<div class="block">
					<form method="post" action="/login">
						<input type="text" placeholder="Логин" name="login" class="input_big">
						<input type="password" placeholder="Пароль" name="password" class="input_big">
						<button class="btn">Войти</button>
					</form>
				</div>

				<?
				$messages = Messages::get();
				if(!empty($messages)){
					foreach($messages as $message){
						echo '<div class="message message-'.$message['type'].'">'.$message['text'].'<span class="message_close icon-cancel"></span></div>';
					}
				}
				?>
			</div>
		</div>
	</div>
</body>
</html>
開發者ID:paShaman,項目名稱:Scala,代碼行數:30,代碼來源:not_auth.php

示例7: testMessageFormattingReturnsEntryCopy

 /**
  * Test the Messages::get method.
  *
  * @group laravel
  */
 public function testMessageFormattingReturnsEntryCopy()
 {
     $this->messages->add_typed('ok', 'success');
     $this->assertEquals(array(new Entry('<p>ok</p>', 'success')), $this->messages->get('success', '<p>:message</p>'));
     $this->assertEquals(array('success' => array(new Entry('ok', 'success'))), $this->messages->messages);
 }
開發者ID:SerdarSanri,項目名稱:laravel-simplemessage,代碼行數:11,代碼來源:typedmessages.test.php

示例8: intval

$ADK_USERGROUP_CDE = $_SESSION['ADK_USERGROUP_CDE'];
$ADK_USER_ID = intval($_SESSION['ADK_USER_ID']);
$ADK_TO_USER_ID = null;
if (isset($_GET['_']) && is_numeric($_GET['_'])) {
    $ADK_TO_USER_ID = $_GET['_'];
}
$con = connect_db();
if ($ADK_TO_USER_ID) {
    $ADK_TO_USER = new User();
    $ADK_TO_USER->id = $ADK_TO_USER_ID;
    $ADK_TO_USER->get($con);
}
$ADK_MESSAGES = new Messages();
$ADK_MESSAGES->userid = $ADK_USER_ID;
$ADK_MESSAGES->foldername = 'Inbox';
$ADK_MESSAGES->get($con);
switch ($ADK_USERGROUP_CDE) {
    case 'ADM':
        require_once 'includes/classes/Template.php';
        $ADK_MSG_TMPLS = new Templates();
        $ADK_MSG_TMPLS->get($con, $_SESSION['ADK_USER_ID']);
        $ADK_HIKERS = new Hikers();
        $ADK_HIKERS->get($con, $ADK_USER_ID);
        break;
    case 'COR':
        require_once 'includes/classes/Template.php';
        $ADK_MSG_TMPLS = new Templates();
        $ADK_MSG_TMPLS->get($con, $_SESSION['ADK_USER_ID']);
        $ADK_HIKERS = new Hikers();
        $ADK_HIKERS->get($con, $ADK_USER_ID);
        break;
開發者ID:neilsimp1,項目名稱:adk,代碼行數:31,代碼來源:messages.inc.php

示例9: init_media

 public function init_media()
 {
     $this->template_js_params = array('CURRENT_URL' => Request::current()->url(TRUE) . URL::query(), 'BASE_URL' => URL::backend(ADMIN_DIR_NAME, TRUE), 'SITE_URL' => URL::base(TRUE), 'ADMIN_DIR_NAME' => ADMIN_DIR_NAME, 'ADMIN_RESOURCES' => ADMIN_RESOURCES, 'PUBLIC_URL' => PUBLIC_URL, 'LOCALE' => I18n::lang(), 'CONTROLLER' => strtolower(Request::current()->controller()), 'ACTION' => Request::current()->action(), 'USER_ID' => Auth::get_id(), 'DATE_FORMAT' => Config::get('site', 'date_format'), 'IS_BACKEND' => IS_BACKEND, 'CLOSE_POPUP' => Session::instance()->get_once('close_popup', FALSE));
     foreach (Messages::get() as $type => $messages) {
         $this->template_js_params['MESSAGE_' . strtoupper($type)] = $messages;
     }
 }
開發者ID:kodicms,項目名稱:core,代碼行數:7,代碼來源:Template.php

示例10: action_card_edit

 /**
  * редактирование карты
  */
 public function action_card_edit()
 {
     $params = $this->request->post('params');
     $result = Model_Card::editCard($params, Model_Card::CARD_ACTION_EDIT);
     if (empty($result)) {
         $this->jsonResult(false);
     }
     $messages = Messages::get();
     if (!empty($messages)) {
         $this->jsonResult(false, $messages);
     }
     $this->jsonResult(true, $result);
 }
開發者ID:paShaman,項目名稱:Scala,代碼行數:16,代碼來源:Clients.php


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