PHP 클래스 Owl\Handlers\Events\EmailNotification

파일 보기 프로젝트 열기: owl/owl

보호된 프로퍼티들

프로퍼티 타입 설명
$itemService Owl\Services\ItemService
$mail Illuminate\Contracts\Mail\Mailer
$mailNotifyService Owl\Services\MailNotifyService
$userRoleService Owl\Services\UserRoleService
$userService Owl\Services\UserService

공개 메소드들

메소드 설명
__construct ( Illuminate\Contracts\Mail\Mailer $mailer, ItemService $itemService, UserService $userService, UserRoleService $userRoleService, MailNotifyService $mailNotifyService )
onGetComment ( CommentEvent $event ) 記事にコメントがついた時のメール通知
onGetFavorite ( Owl\Events\Item\FavoriteEvent $event ) 記事がお気に入りされた時
onGetLike ( Owl\Events\Item\LikeEvent $event ) 記事にいいね!がついた時
onItemEdited ( Owl\Events\Item\EditEvent $event ) 記事が編集された時
subscribe ( Illuminate\Events\Dispatcher $events ) 各イベントにハンドラーメソッドを登録

보호된 메소드들

메소드 설명
areUsersSame ( stdclass $recipient, stdclass $sender ) : boolean 通知を発生させたユーザと通知を受け取るユーザが同じかチェックする
getDataForMail ( stdclass $item, stdclass $recipient, stdclass $sender ) : array Mail View用の基本データを取得
notificationIsEnabled ( string $type, integer $userId ) : boolean 通知設定をONにしてるかどうかチェックする

메소드 상세

__construct() 공개 메소드

public __construct ( Illuminate\Contracts\Mail\Mailer $mailer, ItemService $itemService, UserService $userService, UserRoleService $userRoleService, MailNotifyService $mailNotifyService )
$mailer Illuminate\Contracts\Mail\Mailer
$itemService Owl\Services\ItemService
$userService Owl\Services\UserService
$userRoleService Owl\Services\UserRoleService
$mailNotifyService Owl\Services\MailNotifyService

areUsersSame() 보호된 메소드

通知を発生させたユーザと通知を受け取るユーザが同じかチェックする
protected areUsersSame ( stdclass $recipient, stdclass $sender ) : boolean
$recipient stdclass
$sender stdclass
리턴 boolean

getDataForMail() 보호된 메소드

Mail View用の基本データを取得
protected getDataForMail ( stdclass $item, stdclass $recipient, stdclass $sender ) : array
$item stdclass
$recipient stdclass
$sender stdclass
리턴 array

notificationIsEnabled() 보호된 메소드

通知設定をONにしてるかどうかチェックする
protected notificationIsEnabled ( string $type, integer $userId ) : boolean
$type string
$userId integer
리턴 boolean

onGetComment() 공개 메소드

記事にコメントがついた時のメール通知
public onGetComment ( CommentEvent $event )
$event Owl\Events\Item\CommentEvent

onGetFavorite() 공개 메소드

記事がお気に入りされた時
public onGetFavorite ( Owl\Events\Item\FavoriteEvent $event )
$event Owl\Events\Item\FavoriteEvent

onGetLike() 공개 메소드

記事にいいね!がついた時
public onGetLike ( Owl\Events\Item\LikeEvent $event )
$event Owl\Events\Item\LikeEvent

onItemEdited() 공개 메소드

記事が編集された時
public onItemEdited ( Owl\Events\Item\EditEvent $event )
$event Owl\Events\Item\EditEvent

subscribe() 공개 메소드

各イベントにハンドラーメソッドを登録
public subscribe ( Illuminate\Events\Dispatcher $events )
$events Illuminate\Events\Dispatcher

프로퍼티 상세

$itemService 보호되어 있는 프로퍼티

protected ItemService,Owl\Services $itemService
리턴 Owl\Services\ItemService

$mail 보호되어 있는 프로퍼티

protected Mailer,Illuminate\Contracts\Mail $mail
리턴 Illuminate\Contracts\Mail\Mailer

$mailNotifyService 보호되어 있는 프로퍼티

protected MailNotifyService,Owl\Services $mailNotifyService
리턴 Owl\Services\MailNotifyService

$userRoleService 보호되어 있는 프로퍼티

protected UserRoleService,Owl\Services $userRoleService
리턴 Owl\Services\UserRoleService

$userService 보호되어 있는 프로퍼티

protected UserService,Owl\Services $userService
리턴 Owl\Services\UserService