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


PHP RPC::commit方法代码示例

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


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

示例1: ajaxShowPosition

 function ajaxShowPosition($pos)
 {
     list($lat, $lon) = explode(',', $pos);
     $pos = json_decode(file_get_contents('http://nominatim.openstreetmap.org/reverse?format=json&lat=' . $lat . '&lon=' . $lon . '&zoom=27&addressdetails=1'));
     RPC::call('movim_fill', 'postpublishlocation', (string) $pos->display_name);
     RPC::commit();
 }
开发者ID:Nyco,项目名称:movim,代码行数:7,代码来源:WidgetCommon.php

示例2: 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

示例3: ajaxUnregister

 function ajaxUnregister()
 {
     $cd = new \Modl\ConfigDAO();
     $config = $cd->get();
     $config->unregister = !$config->unregister;
     $cd->set($config);
     RPC::call('MovimUtils.reloadThis');
     RPC::commit();
 }
开发者ID:Anon215,项目名称:movim,代码行数:9,代码来源:Api.php

示例4: onSessionInitiate

 function onSessionInitiate($jingle)
 {
     $jts = new \JingletoSDP($jingle);
     $sdp = $jts->generate();
     $cd = new \Modl\ContactDAO();
     $contact = $cd->get(cleanJid((string) $jingle->attributes()->initiator));
     if (!isset($contact)) {
         $contact = new Modl\Contact();
     }
     if ($sdp) {
         RPC::call('movim_desktop_notification', $contact->getTrueName(), $this->__('visio.calling'), $contact->getPhoto('m'));
         RPC::call('remoteSetJid', (string) $jingle->attributes()->initiator);
         RPC::call('remoteCall', 'onOffer', $sdp);
         RPC::commit();
     }
 }
开发者ID:christine-ho-dev,项目名称:movim,代码行数:16,代码来源:VisioExt.php

示例5: colorize

         $restart = true;
     }
     #fwrite(STDERR, colorize($message, 'yellow')." : ".colorize('received', 'green')."\n");
     #fwrite(STDERR, colorize(getenv('sid'), 'yellow')." widgets : ".\sizeToCleanSize(memory_get_usage())."\n");
     \Moxl\API::clear();
     \RPC::clear();
     if (!$parser->parse($message)) {
         fwrite(STDERR, colorize(getenv('sid'), 'yellow') . " " . $parser->getError() . "\n");
     }
     if ($restart) {
         $session = \Sessionx::start();
         \Moxl\Stanza\Stream::init($session->host);
         stream_set_blocking($conn->stream, 0);
         $restart = false;
     }
     $msg = \RPC::commit();
     \RPC::clear();
     if (!empty($msg)) {
         echo base64_encode(gzcompress(json_encode($msg), 9)) . "";
         #fwrite(STDERR, colorize($msg.' '.strlen($msg), 'yellow')." : ".colorize('sent to browser', 'green')."\n");
     }
     $xml = \Moxl\API::commit();
     \Moxl\API::clear();
     if (!empty($xml)) {
         $conn->write(trim($xml));
         #fwrite(STDERR, colorize(trim($xml), 'yellow')." : ".colorize('sent to XMPP', 'green')."\n");
     }
 }
 // Two ticks to be sure that we get everything from the socket, sic…
 $loop->tick();
 $loop->tick();
开发者ID:ajira86,项目名称:movim,代码行数:31,代码来源:linker.php

示例6: onGroupMemberList

 function onGroupMemberList($list)
 {
     $html = $this->prepareList($list);
     RPC::call('movim_fill', 'memberlist', $html);
     RPC::commit();
 }
开发者ID:christine-ho-dev,项目名称:movim,代码行数:6,代码来源:NodeAffiliations.php

示例7: onMyVcard4NotReceived

 function onMyVcard4NotReceived()
 {
     Notification::append(null, $this->__('vcard.not_updated'));
     RPC::commit();
 }
开发者ID:vijo,项目名称:movim,代码行数:5,代码来源:Vcard4.php

示例8: ajaxSearchContact

 /**
  *  @brief Search for a contact to add
  */
 function ajaxSearchContact($jid)
 {
     if (filter_var($jid, FILTER_VALIDATE_EMAIL)) {
         RPC::call('movim_redirect', Route::urlize('contact', $jid));
         RPC::commit();
     } else {
         Notification::append(null, $this->__('roster.jid_error'));
     }
 }
开发者ID:Nyco,项目名称:movim,代码行数:12,代码来源:Roster.php

示例9: ajaxBookmarkMucAdd

 function ajaxBookmarkMucAdd($form)
 {
     if (!filter_var($form['jid'], FILTER_VALIDATE_EMAIL)) {
         $html = '<div class="message error">' . $this->__('chatroom.bad_id') . '</div>';
         RPC::call('movim_fill', 'bookmarkmucadderror', $html);
         RPC::commit();
     } elseif (trim($form['name']) == '') {
         $html = '<div class="message error">' . $this->__('chatroom.empty_name') . '</div>';
         RPC::call('movim_fill', 'bookmarkmucadderror', $html);
         RPC::commit();
     } else {
         $item = array('type' => 'conference', 'name' => $form['name'], 'autojoin' => $form['autojoin'], 'nick' => $form['nick'], 'jid' => $form['jid']);
         $this->ajaxSetBookmark($item);
     }
 }
开发者ID:Nyco,项目名称:movim,代码行数:15,代码来源:Bookmark.php

示例10: refresh

 function refresh()
 {
     RPC::call('movim_reload_this');
     RPC::commit();
 }
开发者ID:vincentux,项目名称:movim_ynh,代码行数:5,代码来源:ConfigData.php

示例11: onSubscriptionsList

 function onSubscriptionsList($list)
 {
     $html = $this->prepareList($list);
     RPC::call('movim_fill', 'subscriptionslist', $html);
     RPC::commit();
 }
开发者ID:christine-ho-dev,项目名称:movim,代码行数:6,代码来源:NodeSubscriptions.php

示例12: create

 public function create()
 {
     switch ($this->stream->getName()) {
         case "stream":
             $node = $this->stream->iq->query->x;
             break;
         case "pubsub":
             $node = $this->stream->configure->x;
             break;
         case "command":
             $node = $this->stream->x;
             break;
         default:
             $node = $this->stream->x;
             break;
     }
     foreach ($this->inputs as $key => $value) {
         if ($value === '' && $this->stream->getName() == "stream") {
             RPC::call('movim_reload', Route::urlize('account', 'datamissing'));
             RPC::commit();
             exit;
         } elseif (substr($key, 0, 8) == 'generic_') {
             $key = str_replace('generic_', '', $key);
             if (!is_string($value)) {
                 $value = $value->value;
             }
             $node->addChild($key, $value);
         } elseif ($value->attributes) {
             $field = $node->addChild('field');
             if ($value == 'true' || $value === 1) {
                 $value = '1';
             }
             if ($value == 'false' || $value === 0) {
                 $value = '0';
             }
             $field->addChild('value', trim($value->value));
             if (isset($value->attributes->required)) {
                 $field->addChild('required', '');
             }
             $field->addAttribute('var', $value->attributes->name);
             $field->addAttribute('type', $value->attributes->xmpptype);
             $field->addAttribute('label', $value->attributes->xmpplabel);
         } else {
             $field = $node->addChild('field');
             if ($value == 'true') {
                 $value = '1';
             }
             if ($value == 'false') {
                 $value = '0';
             }
             if (is_bool($value)) {
                 $value = $value ? '1' : '0';
             }
             $field->addChild('value', trim($value));
             $field->addAttribute('var', trim($key));
         }
     }
 }
开发者ID:ajira86,项目名称:movim,代码行数:58,代码来源:XMPPtoForm.php


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