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


PHP Notice::addWhereMaxId方法代码示例

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


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

示例1: getNoticeIds

 function getNoticeIds($offset, $limit, $since_id, $max_id)
 {
     $notice = new Notice();
     $notice->selectAdd();
     // clears it
     $notice->selectAdd('id');
     $notice->orderBy('created DESC, id DESC');
     if (!is_null($offset)) {
         $notice->limit($offset, $limit);
     }
     if (common_config('public', 'localonly')) {
         $notice->whereAdd('is_local = ' . Notice::LOCAL_PUBLIC);
     } else {
         // -1 == blacklisted, -2 == gateway (i.e. Twitter)
         $notice->whereAdd('is_local !=' . Notice::LOCAL_NONPUBLIC);
         $notice->whereAdd('is_local !=' . Notice::GATEWAY);
     }
     Notice::addWhereSinceId($notice, $since_id);
     Notice::addWhereMaxId($notice, $max_id);
     $ids = array();
     if ($notice->find()) {
         while ($notice->fetch()) {
             $ids[] = $notice->id;
         }
     }
     $notice->free();
     $notice = NULL;
     return $ids;
 }
开发者ID:Grasia,项目名称:bolotweet,代码行数:29,代码来源:publicnoticestream.php

示例2: getNoticeIds

 function getNoticeIds($offset, $limit, $since_id, $max_id)
 {
     $notice = new Notice();
     $notice->selectAdd();
     // clears it
     $notice->selectAdd('id');
     $notice->orderBy('created DESC, id DESC');
     if (!is_null($offset)) {
         $notice->limit($offset, $limit);
     }
     // This feed always gives only local activities.
     $notice->whereAdd('is_local = ' . Notice::LOCAL_PUBLIC);
     Notice::addWhereSinceId($notice, $since_id);
     Notice::addWhereMaxId($notice, $max_id);
     if (!empty($this->selectVerbs)) {
         $notice->whereAddIn('verb', $this->selectVerbs, $notice->columnType('verb'));
     }
     $ids = array();
     if ($notice->find()) {
         while ($notice->fetch()) {
             $ids[] = $notice->id;
         }
     }
     $notice->free();
     $notice = NULL;
     return $ids;
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:27,代码来源:publicnoticestream.php

示例3: getNoticeIds

 function getNoticeIds($offset, $limit, $since_id, $max_id)
 {
     $notice = new Notice();
     $notice->selectAdd();
     // clears it
     $notice->selectAdd('id');
     $notice->orderBy('created DESC, id DESC');
     if (!is_null($offset)) {
         $notice->limit($offset, $limit);
     }
     if (common_config('public', 'localonly')) {
         $notice->whereAdd('is_local = ' . Notice::LOCAL_PUBLIC);
     } else {
         // -1 == blacklisted, -2 == gateway (i.e. Twitter)
         $notice->whereAdd('is_local !=' . Notice::LOCAL_NONPUBLIC);
         $notice->whereAdd('is_local !=' . Notice::GATEWAY);
     }
     Notice::addWhereSinceId($notice, $since_id);
     Notice::addWhereMaxId($notice, $max_id);
     $strSql = sprintf('(content_type=%d or content_type=%d)', NOTICE::CONTENT_TYPE_POST, NOTICE::CONTENT_TYPE_REPEAT);
     $strSql = sprintf('(content_type in (%d,%d,%d,%d))', NOTICE::CONTENT_TYPE_REPEAT, NOTICE::CONTENT_TYPE_REPEAT | NOTICE::CONTENT_TYPE_MENTIONS, NOTICE::CONTENT_TYPE_POST, NOTICE::CONTENT_TYPE_POST | NOTICE::CONTENT_TYPE_MENTIONS);
     $notice->whereAdd($strSql);
     $ids = array();
     if ($notice->find()) {
         while ($notice->fetch()) {
             $ids[] = $notice->id;
         }
     }
     $notice->free();
     $notice = NULL;
     return $ids;
 }
开发者ID:jianoll,项目名称:SpeakEnglish_Server,代码行数:32,代码来源:publicnoticestream.php

示例4: getNoticeIds

 function getNoticeIds($offset, $limit, $since_id, $max_id)
 {
     $notice = new Notice();
     $notice->selectAdd();
     // clears it
     $notice->selectAdd('id');
     $notice->orderBy('created DESC, id DESC');
     if (!is_null($offset)) {
         $notice->limit($offset, $limit);
     }
     $notice->whereAdd('is_local =' . Notice::REMOTE);
     // -1 == blacklisted, -2 == gateway (i.e. Twitter)
     $notice->whereAdd('is_local !=' . Notice::LOCAL_NONPUBLIC);
     $notice->whereAdd('is_local !=' . Notice::GATEWAY);
     Notice::addWhereSinceId($notice, $since_id);
     Notice::addWhereMaxId($notice, $max_id);
     if (!empty($this->selectVerbs)) {
         $notice->whereAddIn('verb', $this->selectVerbs, $notice->columnType('verb'));
     }
     $ids = array();
     if ($notice->find()) {
         while ($notice->fetch()) {
             $ids[] = $notice->id;
         }
     }
     $notice->free();
     $notice = NULL;
     return $ids;
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:29,代码来源:networkpublicnoticestream.php

示例5: _streamDirect

 function _streamDirect($user_id, $offset = 0, $limit = NOTICES_PER_PAGE, $since_id = 0, $max_id = 0)
 {
     $reply = new Reply();
     $reply->profile_id = $user_id;
     Notice::addWhereSinceId($reply, $since_id, 'notice_id', 'modified');
     Notice::addWhereMaxId($reply, $max_id, 'notice_id', 'modified');
     $reply->orderBy('modified DESC, notice_id DESC');
     if (!is_null($offset)) {
         $reply->limit($offset, $limit);
     }
     $ids = array();
     if ($reply->find()) {
         while ($reply->fetch()) {
             $ids[] = $reply->notice_id;
         }
     }
     return $ids;
 }
开发者ID:microcosmx,项目名称:experiments,代码行数:18,代码来源:Reply.php

示例6: getNoticeIds

 function getNoticeIds($offset, $limit, $since_id, $max_id)
 {
     $reply = new Reply();
     $reply->profile_id = $this->userId;
     Notice::addWhereSinceId($reply, $since_id, 'notice_id', 'modified');
     Notice::addWhereMaxId($reply, $max_id, 'notice_id', 'modified');
     $reply->orderBy('modified DESC, notice_id DESC');
     if (!is_null($offset)) {
         $reply->limit($offset, $limit);
     }
     $ids = array();
     if ($reply->find()) {
         while ($reply->fetch()) {
             $ids[] = $reply->notice_id;
         }
     }
     return $ids;
 }
开发者ID:Grasia,项目名称:bolotweet,代码行数:18,代码来源:replynoticestream.php

示例7: getNoticeIds

 function getNoticeIds($offset, $limit, $since_id, $max_id)
 {
     $notice = new Notice();
     $notice->profile_id = $this->userId;
     $notice->content_type = Notice::CONTENT_TYPE_COMMENT;
     Notice::addWhereSinceId($notice, $since_id, 'id', 'modified');
     Notice::addWhereMaxId($notice, $max_id, 'id', 'modified');
     $notice->orderBy('modified DESC, id DESC');
     if (!is_null($offset)) {
         $notice->limit($offset, $limit);
     }
     $ids = array();
     if ($notice->find()) {
         while ($notice->fetch()) {
             $ids[] = $notice->id;
         }
     }
     return $ids;
 }
开发者ID:jianoll,项目名称:SpeakEnglish_Server,代码行数:19,代码来源:commentbyusernoticestream.php

示例8: getNoticeIds

 function getNoticeIds($offset, $limit, $since_id, $max_id)
 {
     $notice = new Notice();
     $notice->profile_id = $this->profile->id;
     $notice->selectAdd();
     $notice->selectAdd('id');
     Notice::addWhereSinceId($notice, $since_id);
     Notice::addWhereMaxId($notice, $max_id);
     $notice->orderBy('created DESC, id DESC');
     if (!is_null($offset)) {
         $notice->limit($offset, $limit);
     }
     $notice->find();
     $ids = array();
     while ($notice->fetch()) {
         $ids[] = $notice->id;
     }
     return $ids;
 }
开发者ID:harriewang,项目名称:InnertieWebsite,代码行数:19,代码来源:profilenoticestream.php

示例9: _streamDirect

 function _streamDirect($tag, $offset, $limit, $since_id, $max_id)
 {
     $nt = new Notice_tag();
     $nt->tag = $tag;
     $nt->selectAdd();
     $nt->selectAdd('notice_id');
     Notice::addWhereSinceId($nt, $since_id, 'notice_id');
     Notice::addWhereMaxId($nt, $max_id, 'notice_id');
     $nt->orderBy('created DESC, notice_id DESC');
     if (!is_null($offset)) {
         $nt->limit($offset, $limit);
     }
     $ids = array();
     if ($nt->find()) {
         while ($nt->fetch()) {
             $ids[] = $nt->notice_id;
         }
     }
     return $ids;
 }
开发者ID:microcosmx,项目名称:experiments,代码行数:20,代码来源:Notice_tag.php

示例10: getNoticeIds

 /**
  * Stream of notices linking to this URL
  *
  * @param integer $offset   Offset to show; default is 0
  * @param integer $limit    Limit of notices to show
  * @param integer $since_id Since this notice
  * @param integer $max_id   Before this notice
  *
  * @return array ids of notices that link to this file
  */
 function getNoticeIds($offset, $limit, $since_id, $max_id)
 {
     $f2p = new File_to_post();
     $f2p->selectAdd();
     $f2p->selectAdd('post_id');
     $f2p->file_id = $this->file->id;
     Notice::addWhereSinceId($f2p, $since_id, 'post_id', 'modified');
     Notice::addWhereMaxId($f2p, $max_id, 'post_id', 'modified');
     $f2p->orderBy('modified DESC, post_id DESC');
     if (!is_null($offset)) {
         $f2p->limit($offset, $limit);
     }
     $ids = array();
     if ($f2p->find()) {
         while ($f2p->fetch()) {
             $ids[] = $f2p->post_id;
         }
     }
     return $ids;
 }
开发者ID:Grasia,项目名称:bolotweet,代码行数:30,代码来源:filenoticestream.php

示例11: getNoticeIds

 function getNoticeIds($offset, $limit, $since_id, $max_id)
 {
     $inbox = new Group_inbox();
     $inbox->group_id = $this->group->id;
     $inbox->selectAdd();
     $inbox->selectAdd('notice_id');
     Notice::addWhereSinceId($inbox, $since_id, 'notice_id');
     Notice::addWhereMaxId($inbox, $max_id, 'notice_id');
     $inbox->orderBy('created DESC, notice_id DESC');
     if (!is_null($offset)) {
         $inbox->limit($offset, $limit);
     }
     $ids = array();
     if ($inbox->find()) {
         while ($inbox->fetch()) {
             $ids[] = $inbox->notice_id;
         }
     }
     return $ids;
 }
开发者ID:harriewang,项目名称:InnertieWebsite,代码行数:20,代码来源:groupnoticestream.php

示例12: getNoticeIds

 function getNoticeIds($offset, $limit, $since_id, $max_id)
 {
     $ss = new Spam_score();
     $ss->is_spam = 1;
     $ss->selectAdd();
     $ss->selectAdd('notice_id');
     Notice::addWhereSinceId($ss, $since_id, 'notice_id');
     Notice::addWhereMaxId($ss, $max_id, 'notice_id');
     $ss->orderBy('notice_created DESC, notice_id DESC');
     if (!is_null($offset)) {
         $ss->limit($offset, $limit);
     }
     $ids = array();
     if ($ss->find()) {
         while ($ss->fetch()) {
             $ids[] = $ss->notice_id;
         }
     }
     return $ids;
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:20,代码来源:spamnoticestream.php

示例13: getNoticeIds

 function getNoticeIds($offset, $limit, $since_id, $max_id)
 {
     $reply = new Reply();
     $reply->selectAdd();
     $reply->selectAdd('notice_id');
     $reply->whereAdd(sprintf('reply.profile_id = %u', $this->userId));
     Notice::addWhereSinceId($reply, $since_id, 'notice_id', 'reply.modified');
     Notice::addWhereMaxId($reply, $max_id, 'notice_id', 'reply.modified');
     if (!empty($this->selectVerbs)) {
         $reply->joinAdd(array('notice_id', 'notice:id'));
         $reply->whereAddIn('notice.verb', $this->selectVerbs, 'string');
     }
     $reply->orderBy('reply.modified DESC, reply.notice_id DESC');
     if (!is_null($offset)) {
         $reply->limit($offset, $limit);
     }
     $ids = array();
     if ($reply->find()) {
         while ($reply->fetch()) {
             $ids[] = $reply->notice_id;
         }
     }
     return $ids;
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:24,代码来源:replynoticestream.php

示例14: getNoticeIds

 function getNoticeIds($offset, $limit, $since_id, $max_id)
 {
     $notice = new Notice();
     $notice->selectAdd();
     $notice->selectAdd('id');
     $notice->orderBy('id DESC');
     if (!is_null($offset)) {
         $notice->limit($offset, $limit);
     }
     $notice->whereAdd('is_local !=' . Notice::LOCAL_NONPUBLIC);
     $notice->whereAdd('is_local !=' . Notice::GATEWAY);
     $notice->whereAdd('repeat_of IS NULL');
     Notice::addWhereSinceId($notice, $since_id);
     Notice::addWhereMaxId($notice, $max_id);
     $ids = array();
     if ($notice->find()) {
         while ($notice->fetch()) {
             $ids[] = $notice->id;
         }
     }
     $notice->free();
     $notice = NULL;
     return $ids;
 }
开发者ID:bashrc,项目名称:gnusocial-qvitter-debian,代码行数:24,代码来源:PublicAndExternalNoticeStream.php

示例15: getNoticeIds

 function getNoticeIds($offset, $limit, $since_id, $max_id)
 {
     $notice = new Notice();
     $notice->profile_id = $this->profile->id;
     $notice->selectAdd();
     $notice->selectAdd('id');
     Notice::addWhereSinceId($notice, $since_id);
     Notice::addWhereMaxId($notice, $max_id);
     $strSql = sprintf('(content_type in (%d,%d,%d,%d))', NOTICE::CONTENT_TYPE_REPEAT, NOTICE::CONTENT_TYPE_REPEAT | NOTICE::CONTENT_TYPE_MENTIONS, NOTICE::CONTENT_TYPE_POST, NOTICE::CONTENT_TYPE_POST | NOTICE::CONTENT_TYPE_MENTIONS);
     $notice->whereAdd($strSql);
     $notice->orderBy('created DESC, id DESC');
     if (!is_null($offset)) {
         $notice->limit($offset, $limit);
     }
     $notice->find();
     $ids = array();
     while ($notice->fetch()) {
         $ids[] = $notice->id;
     }
     return $ids;
 }
开发者ID:jianoll,项目名称:SpeakEnglish_Server,代码行数:21,代码来源:profilenoticestream.php


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