3 * Table Definition for reply
5 require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
7 class Reply extends Memcached_DataObject
10 /* the code below is auto generated do not remove the above tag */
12 public $__table = 'reply'; // table name
13 public $notice_id; // int(4) primary_key not_null
14 public $profile_id; // int(4) primary_key not_null
15 public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
16 public $replied_id; // int(4)
19 function staticGet($k,$v=null)
20 { return Memcached_DataObject::staticGet('Reply',$k,$v); }
22 /* the code above is auto generated do not remove the tag below */
25 function stream($user_id, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0, $since=null)
27 $ids = Notice::stream(array('Reply', '_streamDirect'),
29 'reply:stream:' . $user_id,
30 $offset, $limit, $since_id, $max_id, $since);
34 function _streamDirect($user_id, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0, $since=null)
37 $reply->profile_id = $user_id;
40 $reply->whereAdd('notice_id > ' . $since_id);
44 $reply->whereAdd('notice_id < ' . $max_id);
47 if (!is_null($since)) {
48 $reply->whereAdd('modified > \'' . date('Y-m-d H:i:s', $since) . '\'');
51 $reply->orderBy('notice_id DESC');
53 if (!is_null($offset)) {
54 $reply->limit($offset, $limit);
60 while ($reply->fetch()) {
61 $ids[] = $reply->notice_id;