PHP Class common\services\NotificationService

Mostra file Open project: iiyii/getyii

Public Properties

Property Type Description
$notifiedUsers

Public Methods

Method Description
batchNotify ( $type, User $fromUser, $users, Post $post, PostComment $comment = null ) : boolean 批量处理通知
findUserActionNotify ( UserMeta $meta ) : null | static 查找用户的动作通知
newActionNotify ( $type, $fromUserId, $toUserId, Post $post, PostComment $comment = null ) 点赞和其他动作通知
newPostNotify ( User $fromUser, Post $post, [] $users ) 内容@用户会有通知
newReplyNotify ( User $fromUser, Topic $topic, PostComment $comment, $atUsers ) 评论和@用户会有通知

Method Details

batchNotify() public method

批量处理通知
public batchNotify ( $type, User $fromUser, $users, Post $post, PostComment $comment = null ) : boolean
$type
$fromUser common\models\User
$users
$post common\models\Post
$comment common\models\PostComment
return boolean

findUserActionNotify() public method

查找用户的动作通知
public findUserActionNotify ( UserMeta $meta ) : null | static
$meta frontend\modules\user\models\UserMeta
return null | static

newActionNotify() public method

点赞和其他动作通知
public newActionNotify ( $type, $fromUserId, $toUserId, Post $post, PostComment $comment = null )
$type
$fromUserId
$toUserId
$post common\models\Post
$comment common\models\PostComment

newPostNotify() public method

内容@用户会有通知
public newPostNotify ( User $fromUser, Post $post, [] $users )
$fromUser common\models\User
$post common\models\Post
$users []

newReplyNotify() public method

评论和@用户会有通知
public newReplyNotify ( User $fromUser, Topic $topic, PostComment $comment, $atUsers )
$fromUser common\models\User
$topic frontend\modules\topic\models\Topic
$comment common\models\PostComment

Property Details

$notifiedUsers public_oe property

public $notifiedUsers