give
/
vendor
/
vendor-prefixed
/
stellarwp
/
admin-notices
/
src
/
Contracts
/
NotificationsRegistrarInterface.php
NotificationsRegistrarInterface.php
37 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Give\Vendors\StellarWP\AdminNotices\Contracts; |
| 6 | |
| 7 | use Give\Vendors\StellarWP\AdminNotices\AdminNotice; |
| 8 | use Give\Vendors\StellarWP\AdminNotices\Exceptions\NotificationCollisionException; |
| 9 | |
| 10 | interface NotificationsRegistrarInterface |
| 11 | { |
| 12 | /** |
| 13 | * Adds a notice to the register and throws a NotificationCollisionException if a notice with the same ID already exists. |
| 14 | * |
| 15 | * @since 1.0.0 |
| 16 | * |
| 17 | * @throws NotificationCollisionException |
| 18 | */ |
| 19 | public function registerNotice(AdminNotice $notice): void; |
| 20 | |
| 21 | /** |
| 22 | * Removes a notice from the register. |
| 23 | * |
| 24 | * @since 1.0.0 |
| 25 | */ |
| 26 | public function unregisterNotice(string $id): void; |
| 27 | |
| 28 | /** |
| 29 | * Returns all the notices in the register. |
| 30 | * |
| 31 | * @since 1.0.0 |
| 32 | * |
| 33 | * @return AdminNotice[] |
| 34 | */ |
| 35 | public function getNotices(): array; |
| 36 | } |
| 37 |