当前位置: 首页>>代码示例>>PHP>>正文


PHP Notification::append方法代码示例

本文整理汇总了PHP中Notification::append方法的典型用法代码示例。如果您正苦于以下问题:PHP Notification::append方法的具体用法?PHP Notification::append怎么用?PHP Notification::append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Notification的用法示例。


在下文中一共展示了Notification::append方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onLocationPublishError

 function onLocationPublishError($error)
 {
     Notification::append(null, $error);
     RPC::call('movim_delete', 'mapdiv');
     RPC::call('movim_delete', 'mapdata');
     RPC::commit();
 }
开发者ID:christine-ho-dev,项目名称:movim,代码行数:7,代码来源:Location.php

示例2: onConfigured

 function onConfigured($package)
 {
     $node = $package->content;
     switch ($node) {
         case 'storage:bookmarks':
             $notif = $this->__('init.bookmark');
             break;
         case 'urn:xmpp:vcard4':
             $notif = $this->__('init.vcard4');
             break;
         case 'urn:xmpp:avatar:data':
             $notif = $this->__('init.avatar');
             break;
         case 'http://jabber.org/protocol/geoloc':
             $notif = $this->__('init.location');
             break;
         case 'urn:xmpp:pubsub:subscription':
             $notif = $this->__('init.subscriptions');
             break;
         case 'urn:xmpp:microblog:0':
             $notif = $this->__('init.microblog');
             break;
     }
     RPC::call('Init.setNode', $node);
     Notification::append(null, $notif);
 }
开发者ID:Anon215,项目名称:movim,代码行数:26,代码来源:Init.php

示例3: onMyAvatarError

 function onMyAvatarError()
 {
     $cd = new \modl\ContactDAO();
     $me = $cd->get();
     $html = $this->prepareForm($me);
     RPC::call('movim_fill', 'avatar_form', $html);
     Notification::append(null, $this->__('avatar.not_updated'));
 }
开发者ID:christine-ho-dev,项目名称:movim,代码行数:8,代码来源:Avatar.php

示例4: onMyPresence

 function onMyPresence($packet)
 {
     $html = $this->preparePresence();
     RPC::call('MovimTpl.fill', '#presence_widget', $html);
     Notification::append(null, $this->__('status.updated'));
     RPC::call('Presence.refresh');
     RPC::call('MovimUtils.removeClass', '#presence_widget', 'unfolded');
 }
开发者ID:Anon215,项目名称:movim,代码行数:8,代码来源:Presence.php

示例5: onConfig

 function onConfig($package)
 {
     $data = (array) $package->content;
     $this->user->setConfig($data);
     $html = $this->prepareConfigForm();
     RPC::call('movim_fill', 'config_widget', $html);
     RPC::call('Config.load');
     Notification::append(null, $this->__('config.updated'));
 }
开发者ID:Trim,项目名称:movim,代码行数:9,代码来源:Config.php

示例6: ajaxRefresh

 function ajaxRefresh()
 {
     Notification::append(null, $this->__('menu.refresh'));
     $sd = new \modl\SubscriptionDAO();
     $subscriptions = $sd->getSubscribed();
     foreach ($subscriptions as $s) {
         $r = new GetItems();
         $r->setTo($s->server)->setNode($s->node)->request();
     }
 }
开发者ID:spthaolt,项目名称:movim,代码行数:10,代码来源:Menu.php

示例7: ajaxRegister

 function ajaxRegister()
 {
     $cd = new \Modl\ConfigDAO();
     $config = $cd->get();
     $json = requestURL(MOVIM_API . 'register', 3, array('uri' => BASE_URI, 'rewrite' => false));
     $json = json_decode($json);
     if (isset($json) && $json->status == 200) {
         RPC::call('MovimUtils.reloadThis');
         Notification::append(null, $this->__('api.conf_updated'));
     }
 }
开发者ID:Anon215,项目名称:movim,代码行数:11,代码来源:Api.php

示例8: onDelete

 function onDelete($packet)
 {
     $content = $packet->content;
     if (substr($content['node'], 0, 29) == 'urn:xmpp:microblog:0:comments') {
         Notification::append(false, $this->__('post.comment_deleted'));
         $this->ajaxGetComments($content['server'], substr($content['node'], 30));
     } else {
         Notification::append(false, $this->__('post.deleted'));
         $this->ajaxClear();
         RPC::call('MovimTpl.hidePanel');
         RPC::call('Menu_ajaxGetAll');
     }
 }
开发者ID:Anon215,项目名称:movim,代码行数:13,代码来源:Post.php

示例9: ajaxRegister

 function ajaxRegister()
 {
     $rewrite = false;
     if (isset($_SERVER['HTTP_MOD_REWRITE']) && $_SERVER['HTTP_MOD_REWRITE']) {
         $rewrite = true;
     }
     $json = requestURL(MOVIM_API . 'register', 1, array('uri' => BASE_URI, 'rewrite' => $rewrite));
     $json = json_decode($json);
     if (isset($json) && $json->status == 200) {
         RPC::call('movim_reload_this');
         Notification::append(null, $this->__('api.conf_updated'));
     }
 }
开发者ID:Nyco,项目名称:movim,代码行数:13,代码来源:Api.php

示例10: ajaxSubmit

 function ajaxSubmit($data)
 {
     if (!$this->validateForm($data)) {
         $this->refreshConfig();
         Notification::append(null, $this->__('config.not_valid'));
         return;
     }
     $config = $this->user->getConfig();
     if (isset($config)) {
         $data = array_merge($config, $data);
     }
     $s = new Set();
     $s->setXmlns('movim:prefs')->setData(serialize($data))->request();
 }
开发者ID:christine-ho-dev,项目名称:movim,代码行数:14,代码来源:Config.php

示例11: onNotifs

 function onNotifs($from = false)
 {
     $html = $this->prepareNotifs();
     RPC::call('MovimTpl.fill', '#notifs_widget', $html);
     RPC::call('Notifs.refresh');
     if (is_string($from)) {
         $cd = new \Modl\ContactDAO();
         $contact = $cd->get($from);
         $avatar = $contact->getPhoto('s');
         if ($avatar == false) {
             $avatar = null;
         }
         Notification::append('invite|' . $from, $contact->getTrueName(), $this->__('notifs.wants_to_talk', $contact->getTrueName()), $avatar, 4);
     }
 }
开发者ID:Anon215,项目名称:movim,代码行数:15,代码来源:Notifs.php

示例12: ajaxChangePassword

 function ajaxChangePassword($form)
 {
     $validate = Validator::string()->length(6, 40);
     $p1 = $form->password->value;
     $p2 = $form->password_confirmation->value;
     if ($validate->validate($p1) && $validate->validate($p2)) {
         if ($p1 == $p2) {
             $arr = explodeJid($this->user->getLogin());
             $cp = new ChangePassword();
             $cp->setTo($arr['server'])->setUsername($arr['username'])->setPassword($p1)->request();
         } else {
             RPC::call('Account.resetPassword');
             Notification::append(null, $this->__('account.password_not_same'));
         }
     } else {
         RPC::call('Account.resetPassword');
         Notification::append(null, $this->__('account.password_not_valid'));
     }
 }
开发者ID:Trim,项目名称:movim,代码行数:19,代码来源:Account.php

示例13: ajaxLogin

 function ajaxLogin($username)
 {
     $validate_user = Validator::string()->length(4, 40);
     if (!$validate_user->validate($username)) {
         Notification::append(null, $this->__('login_anonymous.bad_username'));
         return;
     }
     // We get the Server Configuration
     $cd = new \Modl\ConfigDAO();
     $config = $cd->get();
     $host = 'anonymous.jappix.com';
     $password = 'AmISnowden?';
     // We try to get the domain
     $domain = \Moxl\Utils::getDomain($host);
     // We launch the XMPP socket
     RPC::call('register', $host);
     // We set the username in the session
     $s = Session::start();
     $s->set('username', $username);
     // We create a new session or clear the old one
     $s = Sessionx::start();
     $s->init($username, $password, $host, $domain);
     \Moxl\Stanza\Stream::init($host);
 }
开发者ID:Nyco,项目名称:movim,代码行数:24,代码来源:LoginAnonymous.php

示例14: checkConnected

 function checkConnected($room, $resource = false)
 {
     if (!$this->validateRoom($room)) {
         return;
     }
     if ($resource && !$this->validateResource($resource)) {
         Notification::append(null, $this->__('chatrooms.bad_id'));
         return;
     }
     $pd = new \Modl\PresenceDAO();
     if ($resource == false) {
         $session = \Session::start();
         $resource = $session->get('username');
     }
     $presence = $pd->getPresence($room, $resource);
     if ($presence != null) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:Anon215,项目名称:movim,代码行数:21,代码来源:Rooms.php

示例15: ajaxGetHistory

 /**
  * @brief Get the chat history
  *
  * @param string jid
  * @param string time
  */
 function ajaxGetHistory($jid, $date)
 {
     if (!$this->validateJid($jid)) {
         return;
     }
     $md = new \Modl\MessageDAO();
     $messages = $md->getHistory(echapJid($jid), date(DATE_ISO8601, strtotime($date)), $this->_pagination);
     if (count($messages) > 0) {
         Notification::append(false, $this->__('message.history', count($messages)));
         foreach ($messages as $message) {
             if (!preg_match('#^\\?OTR#', $message->body)) {
                 //RPC::call('Chat.appendMessage', $this->prepareMessage($message), true);
                 //$this->_msgMap[$message->published.$message->jid] = $message;
                 $this->prepareMessage($message);
             }
         }
         //foreach($this->_msgMap as $message)
         //    $this->prepareMessage($message);
         RPC::call('Chat.appendMessagesWrapper', $this->_wrapper, true);
         $this->_wrapper = array();
         //RPC::call('Chat.cleanBubbles');
     }
 }
开发者ID:Anon215,项目名称:movim,代码行数:29,代码来源:Chat.php


注:本文中的Notification::append方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。