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


PHP Invitation::fetch方法代码示例

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


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

示例1: handle

 /**
  * Handle the site
  *
  * @param array $remitem type of reminder to send and any special options
  * @return boolean true on success, false on failure
  */
 function handle($remitem)
 {
     list($type, $opts) = $remitem;
     $qm = QueueManager::get();
     try {
         switch ($type) {
             case UserConfirmRegReminderHandler::REGISTER_REMINDER:
                 $confirm = new Confirm_address();
                 $confirm->address_type = $type;
                 $confirm->find();
                 while ($confirm->fetch()) {
                     try {
                         $qm->enqueue(array($confirm, $opts), 'uregrem');
                     } catch (Exception $e) {
                         common_log(LOG_WARNING, $e->getMessage());
                         continue;
                     }
                 }
                 break;
             case UserInviteReminderHandler::INVITE_REMINDER:
                 $invitation = new Invitation();
                 // Only send one reminder (the latest one), regardless of how many invitations a user has
                 $sql = 'SELECT * FROM (SELECT * FROM invitation WHERE registered_user_id IS NULL ORDER BY created DESC) invitees GROUP BY invitees.address';
                 $invitation->query($sql);
                 while ($invitation->fetch()) {
                     try {
                         $qm->enqueue(array($invitation, $opts), 'uinvrem');
                     } catch (Exception $e) {
                         common_log(LOG_WARNING, $e->getMessage());
                         continue;
                     }
                 }
                 break;
             default:
                 // WTF?
                 common_log(LOG_ERR, "Received unknown confirmation address type", __FILE__);
         }
     } catch (Exception $e) {
         common_log(LOG_ERR, $e->getMessage());
         return false;
     }
     return true;
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:49,代码来源:siteconfirmreminderhandler.php

示例2: emailChanged

 function emailChanged()
 {
     $invites = new Invitation();
     $invites->address = $this->email;
     $invites->address_type = 'email';
     if ($invites->find()) {
         while ($invites->fetch()) {
             $other = User::staticGet($invites->user_id);
             subs_subscribe_to($other, $this);
         }
     }
 }
开发者ID:stevertiqo,项目名称:StatusNet,代码行数:12,代码来源:User.php

示例3: emailChanged

 function emailChanged()
 {
     $invites = new Invitation();
     $invites->address = $this->email;
     $invites->address_type = 'email';
     if ($invites->find()) {
         while ($invites->fetch()) {
             try {
                 $other = Profile::getKV('id', $invites->user_id);
                 if (!$other instanceof Profile) {
                     // remove when getKV throws exceptions
                     continue;
                 }
                 Subscription::start($other, $this->getProfile());
             } catch (Exception $e) {
                 continue;
             }
         }
     }
 }
开发者ID:phpsource,项目名称:gnu-social,代码行数:20,代码来源:User.php


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