nineinchnick\nfy\components\DbQueue::createMessage PHP Method

createMessage() protected method

This method may be overriden in extending classes.
protected createMessage ( string $body ) : nineinchnick\nfy\models\DbMessage
$body string message body
return nineinchnick\nfy\models\DbMessage
    protected function createMessage($body)
    {
        $message = new models\DbMessage();
        $message->setAttributes(['queue_id' => $this->id, 'timeout' => $this->timeout, 'sender_id' => Yii::$app->has('user') ? Yii::$app->user->getId() : null, 'status' => Message::AVAILABLE, 'body' => $body], false);
        return $this->formatMessage($message);
    }