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


PHP RPC类代码示例

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


在下文中一共展示了RPC类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: ajaxAddChatroom

 function ajaxAddChatroom()
 {
     $r = new Rooms();
     $r->ajaxChatroomAdd(array('jid' => 'movim@conference.movim.eu', 'name' => 'Movim Chatroom', 'nick' => false, 'autojoin' => 0));
     $r->ajaxJoin('movim@conference.movim.eu');
     RPC::call('MovimUtils.redirect', $this->route('chat'));
 }
开发者ID:Anon215,项目名称:movim,代码行数:7,代码来源:Help.php

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

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

示例5: __construct

 public function __construct(MappedClassLoader $mappedClassLoader, SerializationPolicyProvider $serializationPolicyProvider)
 {
     $this->mappedClassLoader = $mappedClassLoader;
     $this->serializationPolicyProvider = $serializationPolicyProvider;
     $this->serializationPolicy = RPC::getDefaultSerializationPolicy();
     $this->logger = LoggerManager::getLogger('gwtphp.rpc.impl.ServerSerializationStreamReader');
 }
开发者ID:rrsc,项目名称:freemed,代码行数:7,代码来源:ServerSerializationStreamReader.class.php

示例6: fill

 static function fill($html = '', $scroll = false)
 {
     RPC::call('movim_fill', 'dialog', $html);
     if ($scroll) {
         RPC::call('Dialog.addScroll');
     }
 }
开发者ID:christine-ho-dev,项目名称:movim,代码行数:7,代码来源:Dialog.php

示例7: 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:bartuspan,项目名称:movim,代码行数:8,代码来源:Avatar.php

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

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

示例10: ajaxGet

 function ajaxGet($type = 'all', $server = null, $node = null, $page = 0)
 {
     $html = $this->prepareList($type, $server, $node, $page);
     if ($page > 0) {
         RPC::call('movim_append', 'menu_wrapper', $html);
     } else {
         RPC::call('movim_fill', 'menu_widget', $html);
         RPC::call('movim_posts_unread', 0);
     }
     RPC::call('Menu.refresh');
 }
开发者ID:spthaolt,项目名称:movim,代码行数:11,代码来源:Menu.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: exchange

 public static function exchange($amount, $from = 'NZD', $to = 'CNY')
 {
     $url = "http://www.google.com/finance/converter?a={$amount}&from={$from}&to={$to}";
     if ($data = RPC::fetch($url)) {
         $dom = new \DOMDocument();
         @$dom->loadHTML($data);
         $finder = new \DomXPath($dom);
         $classname = "bld";
         $nodes = $finder->query("//*[contains(concat(' ', normalize-space(@class), ' '), ' {$classname} ')]");
         $node = $nodes->item(0)->nodeValue;
         $amount = str_replace(' CNY', '', $node);
         return number_format($amount, 2, '.', ',');
     }
     return false;
 }
开发者ID:salted-herring,项目名称:salted-library,代码行数:15,代码来源:Currency.php

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

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

示例15: onCommand

 function onCommand($package)
 {
     $command = $package->content;
     $view = $this->tpl();
     if (isset($command->note)) {
         $view->assign('note', $command->note);
         Dialog::fill($view->draw('_adhoc_note', true));
     }
     if (isset($command->x)) {
         $xml = new \XMPPtoForm();
         $form = $xml->getHTML($command->x->asXML());
         $view->assign('form', $form);
         $view->assign('attributes', $command->attributes());
         $view->assign('actions', null);
         if (isset($command->actions)) {
             $view->assign('actions', $command->actions);
         }
         Dialog::fill($view->draw('_adhoc_form', true), true);
     }
     RPC::call('AdHoc.initForm');
 }
开发者ID:ajira86,项目名称:movim,代码行数:21,代码来源:AdHoc.php


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