EmailHandler
extends AbstractProcessingHandler
in package
Table of Contents
Properties
- $auditLogContext : AuditLogContext|null
- 通知対象の監査ログ ID を参照するためのコンテキスト
Methods
- setAuditLogContext() : void
- 通知対象の監査ログ ID を参照するためのコンテキストを設定する
- buildMailTxt() : mixed
- getMailBcc() : string
- エラー通知メールのBccを取得
- getMailFrom() : string
- エラー通知メールのFromを取得
- getMailTo() : bool|string
- エラー通知する宛先のアドレスを取得
- nofify() : void
- メール通知する
- suppressNotifications() : bool
- 通知を一時的に止めるか判断
- write() : void
- ログをメールで送信
- buildAuditLogUrl() : string
- 監査ログ一覧の URL を組み立てる。
Properties
$auditLogContext
通知対象の監査ログ ID を参照するためのコンテキスト
private
AuditLogContext|null
$auditLogContext
= null
Methods
setAuditLogContext()
通知対象の監査ログ ID を参照するためのコンテキストを設定する
public
setAuditLogContext(AuditLogContext $auditLogContext) : void
Parameters
- $auditLogContext : AuditLogContext
buildMailTxt()
protected
buildMailTxt(mixed $tplPath, mixed $field) : mixed
Parameters
- $tplPath : mixed
- $field : mixed
getMailBcc()
エラー通知メールのBccを取得
protected
getMailBcc() : string
Return values
stringgetMailFrom()
エラー通知メールのFromを取得
protected
getMailFrom() : string
Return values
stringgetMailTo()
エラー通知する宛先のアドレスを取得
protected
getMailTo() : bool|string
Return values
bool|stringnofify()
メール通知する
protected
nofify(string $to, string $from, string $bcc, string $subject, string $body) : void
Parameters
- $to : string
- $from : string
- $bcc : string
- $subject : string
- $body : string
Tags
suppressNotifications()
通知を一時的に止めるか判断
protected
suppressNotifications(string $lockFilePath, string $countFilePath, int $limit, int $timeRange, int $stopTime) : bool
Parameters
- $lockFilePath : string
- $countFilePath : string
- $limit : int
- $timeRange : int
- $stopTime : int
Return values
boolwrite()
ログをメールで送信
protected
write(array<string|int, mixed> $record) : void
Parameters
- $record : array<string|int, mixed>
buildAuditLogUrl()
監査ログ一覧の URL を組み立てる。
private
buildAuditLogUrl(string $baseUrl, int|null $logId) : string
通知対象ログの ID があれば、一覧画面で該当ログの詳細を自動表示するためのハッシュ (#id={id})を付与する。ID が無い場合は一覧トップの URL をそのまま返す。
Parameters
- $baseUrl : string
-
監査ログ一覧のベース URL
- $logId : int|null
-
通知対象の監査ログ ID