Method | Description | |
---|---|---|
delete ( $message_id, $subscriber_id = null ) | ||
getSubscriptions ( mixed $subscriber_id = null ) : array | nineinchnick\nfy\models\DbSubscription | ||
init ( ) | ||
isSubscribed ( $subscriber_id, $category = null ) | ||
peek ( $subscriber_id = null, $limit, $status = Message::AVAILABLE ) | ||
receive ( $subscriber_id = null, $limit ) | ||
release ( $message_id, $subscriber_id = null ) | ||
releaseTimedout ( ) : array | Releases timed-out messages. | |
removeDeleted ( ) : array | Removes deleted messages from the storage. | |
reserve ( $subscriber_id = null, $limit ) | ||
send ( $message, $category = null ) | ||
subscribe ( $subscriber_id, $label = null, $categories = null, $exceptions = null ) | ||
unsubscribe ( $subscriber_id, $categories = null, boolean $permanent = true ) |
Method | Description | |
---|---|---|
createMessage ( string $body ) : nineinchnick\nfy\models\DbMessage | Creates an instance of DbMessage model. The passed message body may be modified, @see formatMessage(). | |
formatMessage ( nineinchnick\nfy\models\DbMessage $message ) : nineinchnick\nfy\models\DbMessage | Formats the body of a queue message. This method may be overriden in extending classes. | |
receiveInternal ( mixed $subscriber_id = null, integer $limit, integer $mode = self::GET_RESERVE ) : nineinchnick\nfy\models\DbMessage[] | Perform message extraction. | |
saveSubscriptionCategories ( $categories, $subscription_id, $are_exceptions = false ) |
Method | Description | |
---|---|---|
sendToSubscriptions ( nineinchnick\nfy\components\Subscription[] $subscriptions, nineinchnick\nfy\models\DbMessage $queueMessage ) : boolean |
protected createMessage ( string $body ) : nineinchnick\nfy\models\DbMessage | ||
$body | string | message body |
return | nineinchnick\nfy\models\DbMessage |
protected formatMessage ( nineinchnick\nfy\models\DbMessage $message ) : nineinchnick\nfy\models\DbMessage | ||
$message | nineinchnick\nfy\models\DbMessage | |
return | nineinchnick\nfy\models\DbMessage | $message |
public getSubscriptions ( mixed $subscriber_id = null ) : array | nineinchnick\nfy\models\DbSubscription | ||
$subscriber_id | mixed | |
return | array | nineinchnick\nfy\models\DbSubscription |
protected receiveInternal ( mixed $subscriber_id = null, integer $limit, integer $mode = self::GET_RESERVE ) : nineinchnick\nfy\models\DbMessage[] | ||
$subscriber_id | mixed | |
$limit | integer | |
$mode | integer | one of: self::GET_DELETE, self::GET_RESERVE or self::GET_PEEK |
return | nineinchnick\nfy\models\DbMessage[] |
public releaseTimedout ( ) : array | ||
return | array | of released message ids |
public removeDeleted ( ) : array | ||
return | array | of removed message ids |
protected saveSubscriptionCategories ( $categories, $subscription_id, $are_exceptions = false ) |
public subscribe ( $subscriber_id, $label = null, $categories = null, $exceptions = null ) |
public unsubscribe ( $subscriber_id, $categories = null, boolean $permanent = true ) | ||
$permanent | boolean | if false, the subscription will only be marked as removed and the messages will remain in the storage; if true, everything is removed permanently |