| 1 | <?php |
||
| 16 | class MailEvent extends Event implements ResultAwareInterface |
||
| 17 | { |
||
| 18 | const EVENT_MAIL_PRE_SEND = 'event.mail.pre.send'; |
||
| 19 | const EVENT_MAIL_POST_SEND = 'event.mail.post.send'; |
||
| 20 | const EVENT_MAIL_SEND_ERROR = 'event.mail.send.error'; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var ResultInterface |
||
| 24 | */ |
||
| 25 | protected $result; |
||
| 26 | /** |
||
| 27 | * @var Email |
||
| 28 | */ |
||
| 29 | 11 | private $email; |
|
| 30 | |||
| 31 | 11 | public function __construct(Email $email, $name = self::EVENT_MAIL_PRE_SEND) |
|
| 36 | |||
| 37 | /** |
||
| 38 | * @return Email |
||
| 39 | 1 | */ |
|
| 40 | public function getEmail(): Email |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param ResultInterface $result |
||
| 47 | 1 | * @return $this |
|
| 48 | */ |
||
| 49 | 1 | public function setResult(ResultInterface $result) |
|
| 54 | |||
| 55 | /** |
||
| 56 | 10 | * @return ResultInterface|null |
|
| 57 | */ |
||
| 58 | 10 | public function getResult() |
|
| 62 | } |
||
| 63 |