function __construct($tag, $profile = -1) { if (is_int($profile) && $profile == -1) { $profile = Profile::current(); } parent::__construct(new CachingNoticeStream(new RawTagNoticeStream($tag), 'notice_tag:notice_ids:' . Cache::keyize($tag))); }
function __construct($file, $profile = -1) { if (is_int($profile) && $profile == -1) { $profile = Profile::current(); } parent::__construct(new CachingNoticeStream(new RawFileNoticeStream($file), 'file:notice-ids:' . $this->url), $profile); }
function __construct($profile, $userProfile = -1) { if (is_int($userProfile) && $userProfile == -1) { $userProfile = Profile::current(); } parent::__construct(new CachingNoticeStream(new RawProfileNoticeStream($profile), 'profile:notice_ids:' . $profile->id), $userProfile); }
function __construct($userId, $profile = -1) { if (is_int($profile) && $profile == -1) { $profile = Profile::current(); } parent::__construct(new CachingNoticeStream(new RawReplyNoticeStream($userId), 'reply:stream:' . $userId), $profile); }
function __construct($group, $profile = -1) { if (is_int($profile) && $profile == -1) { $profile = Profile::current(); } parent::__construct(new CachingNoticeStream(new RawGroupNoticeStream($group), 'user_group:notice_ids:' . $group->id), $profile); }
function __construct($profile, $tag, $userProfile = -1) { if (is_int($userProfile) && $userProfile == -1) { $userProfile = Profile::current(); } parent::__construct(new CachingNoticeStream(new RawTaggedProfileNoticeStream($profile, $tag), 'profile:notice_ids_tagged:' . $profile->id . ':' . Cache::keyize($tag)), $userProfile); }
function __construct($id, $profile = -1) { if (is_int($profile) && $profile == -1) { $profile = Profile::current(); } parent::__construct(new RawConversationNoticeStream($id), $profile); }
function __construct($plist, $profile = -1) { if (is_int($profile) && $profile == -1) { $profile = Profile::current(); } parent::__construct(new CachingNoticeStream(new RawPeopletagNoticeStream($plist), 'profile_list:notice_ids:' . $plist->id), $profile); }
function __construct($tag, $profile = -1) { if (is_int($profile) && $profile == -1) { $profile = Profile::current(); } parent::__construct(new CachingNoticeStream(new RawSpamNoticeStream(), 'spam_score:notice_ids')); }
function __construct($q, $profile = -1) { if (is_int($profile) && $profile == -1) { $profile = Profile::current(); } parent::__construct(new RawSearchNoticeStream($q), $profile); }
function __construct($user, $profile = -1) { if (is_int($profile) && $profile == -1) { $profile = Profile::current(); } parent::__construct(new CachingNoticeStream(new RawRepeatsOfMeNoticeStream($user), 'user:repeats_of_me:' . $user->id), $profile); }
/** * Constructor * * @param Profile $target Profile to get a stream for * @param Profile $scoped Currently scoped profile (if null, it is fetched) */ function __construct(Profile $target, Profile $scoped = null) { if ($scoped === null) { $scoped = Profile::current(); } // FIXME: we don't use CachingNoticeStream - but maybe we should? parent::__construct(new CachingNoticeStream(new RawInboxNoticeStream($target), 'profileall'), $scoped); }
function getNotices($offset, $limit, $sinceId = null, $maxId = null) { if ($this->impossibleStream()) { return new ArrayWrapper(array()); } else { return parent::getNotices($offset, $limit, $sinceId, $maxId); } }
function getNotices($offset, $limit, $since_id = null, $max_id = null) { if ($this->impossibleStream()) { throw new PrivateStreamException($this->streamProfile, $this->userProfile); } else { return parent::getNotices($offset, $limit, $since_id, $max_id); } }
/** * Constructor * * @param User $user User to get a stream for */ function __construct($user, $profile = -1) { if (is_int($profile) && $profile == -1) { $profile = Profile::current(); } // Note: we don't use CachingNoticeStream since RawInboxNoticeStream // uses Inbox::staticGet(), which is cached. parent::__construct(new RawInboxNoticeStream($user), $profile); }
function __construct($user_id, $own, $profile = -1) { $stream = new RawFaveNoticeStream($user_id, $own); if ($own) { $key = 'fave:ids_by_user_own:' . $user_id; } else { $key = 'fave:ids_by_user:' . $user_id; } if (is_int($profile) && $profile == -1) { $profile = Profile::current(); } parent::__construct(new CachingNoticeStream($stream, $key), $profile); }
function __construct($userId, $profile = -1) { if (is_int($profile) && $profile == -1) { $profile = Profile::current(); } /* parent::__construct(new CachingNoticeStream(new RawReplyNoticeStream($userId), 'reply:stream:' . $userId), $profile);*/ //TODO: add cache parent::__construct(new RawCommentByUserNoticeStream($userId)); /* parent::__construct(new CachingNoticeStream(new RawCommentByUserNoticeStream($senderUserId), 'comment:stream:' . $userId), $profile);*/ }
function filter($notice) { if (!parent::filter($notice)) { // if not in our scope, return false return false; } if (empty($this->rsvp)) { // Don't filter on RSVP (for only events with RSVP if no responses // are given (give ['Y', 'N', '?'] for only RSVP'd events!). return true; } $rsvp = new RSVP(); $rsvp->profile_id = $this->target->getID(); $rsvp->event_uri = $notice->getUri(); $rsvp->whereAddIn('response', $this->rsvp, $rsvp->columnType('response')); // filter out if no RSVP match was found return $rsvp->N > 0; }
function __construct($profile = null) { parent::__construct(new CachingNoticeStream(new RawPublicNoticeStream(), 'public'), $profile); }
function __construct($profile = null) { parent::__construct(new CachingNoticeStream(new RawPopularNoticeStream(), 'popular', false), $profile); }
function __construct(Profile $scoped = null) { parent::__construct(new CachingNoticeStream(new RawNetworkPublicNoticeStream(), 'networkpublic'), $scoped); }