give
/
vendor
/
vendor-prefixed
/
stellarwp
/
admin-notices
/
src
/
Exceptions
/
NotificationCollisionException.php
NotificationCollisionException.php
25 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | |
| 6 | namespace Give\Vendors\StellarWP\AdminNotices\Exceptions; |
| 7 | |
| 8 | use RuntimeException; |
| 9 | use Give\Vendors\StellarWP\AdminNotices\AdminNotice; |
| 10 | |
| 11 | class NotificationCollisionException extends RuntimeException |
| 12 | { |
| 13 | protected $notificationId; |
| 14 | |
| 15 | protected $notification; |
| 16 | |
| 17 | public function __construct(string $notificationId, AdminNotice $notification) |
| 18 | { |
| 19 | $this->notificationId = $notificationId; |
| 20 | $this->notification = $notification; |
| 21 | |
| 22 | parent::__construct("Notification with ID $notificationId already exists."); |
| 23 | } |
| 24 | } |
| 25 |