| 1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace App\Module\Notification\Contracts;
- interface NotificationHookInterface
- {
- /**
- * 发送前钩子
- *
- * @param array $data
- * @return array
- */
- public function beforeSend(array $data): array;
- /**
- * 发送后钩子
- *
- * @param array $data
- * @param bool $result
- * @return void
- */
- public function afterSend(array $data, bool $result): void;
- /**
- * 发送失败钩子
- *
- * @param array $data
- * @param \Exception $exception
- * @return void
- */
- public function onError(array $data, \Exception $exception): void;
- }
|