+ var $group;
+
+ function __construct($group, Profile $scoped=null)
+ {
+ $this->group = $group;
+
+ parent::__construct(new CachingNoticeStream(new RawGroupNoticeStream($group),
+ 'user_group:notice_ids:' . $group->id),
+ $scoped);
+ }
+
+ function getNoticeIds($offset, $limit, $since_id, $max_id)
+ {
+ if ($this->impossibleStream()) {
+ return array();
+ } else {
+ return parent::getNoticeIds($offset, $limit, $since_id, $max_id);
+ }
+ }
+
+ function getNotices($offset, $limit, $sinceId = null, $maxId = null)
+ {
+ if ($this->impossibleStream()) {
+ return new ArrayWrapper(array());
+ } else {
+ return parent::getNotices($offset, $limit, $sinceId, $maxId);
+ }
+ }
+
+ function impossibleStream()