PHP Class Owl\Services\MailNotifyService

Mostra file Open project: owl/owl Class Usage Examples

Protected Properties

Property Type Description
$mailNotify Owl\Repositories\UserMailNotificationRepositoryInterface

Public Methods

Method Description
__construct ( Owl\Repositories\UserMailNotificationRepositoryInterface $userMailNotification )
getSettings ( integer $userId ) : stdclass Get all mail notification settings
updateSetting ( integer $userId, string $type, string $flag ) : boolean Update mail setting

Protected Methods

Method Description
getDefaultColomuns ( integer $userId ) : array Get default setting of user's mail notification
getFlagColomunName ( string $type ) : string Get target column name by specified string

Method Details

__construct() public method

public __construct ( Owl\Repositories\UserMailNotificationRepositoryInterface $userMailNotification )
$userMailNotification Owl\Repositories\UserMailNotificationRepositoryInterface

getDefaultColomuns() protected method

Get default setting of user's mail notification
protected getDefaultColomuns ( integer $userId ) : array
$userId integer
return array

getFlagColomunName() protected method

Get target column name by specified string
protected getFlagColomunName ( string $type ) : string
$type string
return string

getSettings() public method

Get all mail notification settings
public getSettings ( integer $userId ) : stdclass
$userId integer
return stdclass

updateSetting() public method

Update mail setting
public updateSetting ( integer $userId, string $type, string $flag ) : boolean
$userId integer
$type string
$flag string
return boolean

Property Details

$mailNotify protected_oe property

protected UserMailNotificationRepositoryInterface,Owl\Repositories $mailNotify
return Owl\Repositories\UserMailNotificationRepositoryInterface