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


PHP Notice::getStream方法代码示例

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


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

示例1: getStream

 static function getStream($tag, $offset = 0, $limit = 20)
 {
     $qry = 'SELECT notice.* ' . 'FROM notice JOIN notice_tag ON notice.id = notice_tag.notice_id ' . "WHERE notice_tag.tag = '%s' ";
     return Notice::getStream(sprintf($qry, $tag), 'notice_tag:notice_stream:' . common_keyize($tag), $offset, $limit);
 }
开发者ID:Br3nda,项目名称:laconica,代码行数:5,代码来源:Notice_tag.php

示例2: getNotices

 function getNotices($offset = 0, $limit = NOTICES_PER_PAGE, $since_id = 0, $before_id = 0)
 {
     $qry = 'SELECT * ' . 'FROM notice ' . 'WHERE profile_id = %d ';
     return Notice::getStream(sprintf($qry, $this->id), 'profile:notices:' . $this->id, $offset, $limit, $since_id, $before_id);
 }
开发者ID:Br3nda,项目名称:laconica,代码行数:5,代码来源:Profile.php

示例3: publicStream

 function publicStream($offset = 0, $limit = 20, $since_id = 0, $before_id = 0, $since = null)
 {
     $parts = array();
     $qry = 'SELECT * FROM notice ';
     if (common_config('public', 'localonly')) {
         $parts[] = 'is_local = 1';
     } else {
         # -1 == blacklisted
         $parts[] = 'is_local != -1';
     }
     if ($parts) {
         $qry .= ' WHERE ' . implode(' AND ', $parts);
     }
     return Notice::getStream($qry, 'public', $offset, $limit, $since_id, $before_id, null, $since);
 }
开发者ID:Br3nda,项目名称:laconica,代码行数:15,代码来源:Notice.php

示例4: getNotices

 function getNotices($offset, $limit)
 {
     $qry = 'SELECT notice.* ' . 'FROM notice JOIN group_inbox ON notice.id = group_inbox.notice_id ' . 'WHERE group_inbox.group_id = %d ';
     return Notice::getStream(sprintf($qry, $this->id), 'group:notices:' . $this->id, $offset, $limit);
 }
开发者ID:Br3nda,项目名称:laconica,代码行数:5,代码来源:User_group.php

示例5: noticesWithFriends

 function noticesWithFriends($offset = 0, $limit = NOTICES_PER_PAGE, $since_id = 0, $before_id = 0, $since = null)
 {
     $enabled = common_config('inboxes', 'enabled');
     # Complicated code, depending on whether we support inboxes yet
     # XXX: make this go away when inboxes become mandatory
     if ($enabled === false || $enabled == 'transitional' && $this->inboxed == 0) {
         $qry = 'SELECT notice.* ' . 'FROM notice JOIN subscription ON notice.profile_id = subscription.subscribed ' . 'WHERE subscription.subscriber = %d ';
         $order = null;
     } else {
         if ($enabled === true || $enabled == 'transitional' && $this->inboxed == 1) {
             $qry = 'SELECT notice.* ' . 'FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id ' . 'WHERE notice_inbox.user_id = %d ';
             # NOTE: we override ORDER
             $order = null;
         }
     }
     return Notice::getStream(sprintf($qry, $this->id), 'user:notices_with_friends:' . $this->id, $offset, $limit, $since_id, $before_id, $order, $since);
 }
开发者ID:Br3nda,项目名称:laconica,代码行数:17,代码来源:User.php


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