当前位置: 首页>>代码示例>>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;未经允许,请勿转载。