]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/File.php
New NoticeStream class to reify streams of notices
[quix0rs-gnu-social.git] / classes / File.php
index e9a0131c4e4f6110713f0f572ea125d3890226b3..681c33f9cd4f788c962ed6379cfb8ed19d4b2d5c 100644 (file)
@@ -449,12 +449,11 @@ class File extends Memcached_DataObject
 
     function stream($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0)
     {
-        $ids = Notice::stream(array($this, '_streamDirect'),
-                              array(),
-                              'file:notice-ids:'.$this->url,
-                              $offset, $limit, $since_id, $max_id);
+        $stream = new NoticeStream(array($this, '_streamDirect'),
+                                   array(),
+                                   'file:notice-ids:'.$this->url);
 
-        return Notice::getStreamByIds($ids);
+        return $stream->getNotices($offset, $limit, $since_id, $max_id);
     }
 
     /**