public function setMailTags($mail_tags)
public function setMailTags($mail_tags)
Parameters
array | $mail_tags |
Return
wild |
public function getMailTags()
public function getMailTags()
Return
wild |
public function setNotifyAuthor($notify_author)
public function setNotifyAuthor($notify_author)
Parameters
$notify_author |
Return
wild |
public function getNotifyAuthor()
public function getNotifyAuthor()
Return
wild |
public function setRelatedPHIDs($phids)
public function setRelatedPHIDs($phids)
Parameters
array | $phids |
Return
wild |
public function setSubscribedPHIDs($phids)
public function setSubscribedPHIDs($phids)
Parameters
array | $phids |
Return
wild |
public function setPrimaryObjectPHID($phid)
public function setPrimaryObjectPHID($phid)
Parameters
$phid |
Return
wild |
public function setUnexpandablePHIDs($unexpandable_phids)
public function setUnexpandablePHIDs($unexpandable_phids)
Parameters
array | $unexpandable_phids |
Return
wild |
public function getUnexpandablePHIDs()
public function getUnexpandablePHIDs()
Return
wild |
public function setStoryType($story_type)
public function setStoryType($story_type)
Parameters
$story_type |
Return
wild |
public function setStoryData($data)
public function setStoryData($data)
Parameters
array | $data |
Return
wild |
public function setStoryTime($time)
public function setStoryTime($time)
Parameters
$time |
Return
wild |
public function setStoryAuthorPHID($phid)
public function setStoryAuthorPHID($phid)
Parameters
$phid |
Return
wild |
public function setMailRecipientPHIDs($phids)
public function setMailRecipientPHIDs($phids)
Parameters
array | $phids |
Return
wild |
public function publish()
public function publish()
Return
wild |
private function insertNotifications($chrono_key, $subscribed_phids)
private function insertNotifications($chrono_key, $subscribed_phids)
Parameters
$chrono_key | ||
array | $subscribed_phids |
Return
wild |
private function sendNotification($chrono_key, $subscribed_phids)
private function sendNotification($chrono_key, $subscribed_phids)
Parameters
$chrono_key | ||
array | $subscribed_phids |
Return
wild |
private function filterSubscribedPHIDs($phids)
private function filterSubscribedPHIDs($phids)
Remove PHIDs who should not receive notifications from a subscriber list.
Parameters
list<phid> | $phids | List of potential subscribers. |
Return
list<phid> | List of actual subscribers. |
private function expandRecipients($phids)
private function expandRecipients($phids)
Parameters
array | $phids |
Return
wild |
private function generateChronologicalKey()
private function generateChronologicalKey()
We generate a unique chronological key for each story type because we want to be able to page through the stream with a cursor (i.e., select stories after ID = X) so we can efficiently perform filtering after selecting data, and multiple stories with the same ID make this cumbersome without putting a bunch of logic in the client. We could use the primary key, but that would prevent publishing stories which happened in the past. Since it's potentially useful to do that (e.g., if you're importing another data source) build a unique key for each story which has chronological ordering.
Return
string | A unique, time-ordered key which identifies the story. |