Commit 7c37aa80 authored by Evan Prodromou's avatar Evan Prodromou

a stream function for Fave class

parent 1817aedb
......@@ -167,4 +167,32 @@ class Fave extends Memcached_DataObject
return $act;
* Fetch a stream of favorites by profile
* @param integer $profileId Profile that faved
* @param integer $offset Offset from last
* @param integer $limit Number to get
* @return mixed stream of faves, use fetch() to iterate
* @todo Cache results
* @todo integrate with Fave::stream()
static function byProfile($profileId, $offset, $limit)
$fav = new Fave();
$fav->user_id = $profileId;
$fav->orderBy('modified DESC');
$fav->limit($offset, $limit);
return $fav;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment