PHP 클래스 common\services\NotificationService

파일 보기 프로젝트 열기: iiyii/getyii

공개 프로퍼티들

프로퍼티 타입 설명
$notifiedUsers

공개 메소드들

메소드 설명
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 ) 评论和@用户会有通知

메소드 상세

batchNotify() 공개 메소드

批量处理通知
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
리턴 boolean

findUserActionNotify() 공개 메소드

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

newActionNotify() 공개 메소드

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

newPostNotify() 공개 메소드

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

newReplyNotify() 공개 메소드

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

프로퍼티 상세

$notifiedUsers 공개적으로 프로퍼티

public $notifiedUsers