1 | <?php |
||
18 | class DoctrineNotificationRepository extends EntityRepository implements NotificationRepository |
||
19 | { |
||
20 | /** |
||
21 | * @var bool |
||
22 | */ |
||
23 | private $isPrecocious; |
||
24 | |||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | * @param bool $isPrecocious |
||
28 | */ |
||
29 | 5 | public function __construct($em, ClassMetadata $class, bool $isPrecocious) |
|
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | 5 | public function add(Notification $notification, bool $precocious = false): void |
|
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | * @throws ORMException |
||
50 | * @throws OptimisticLockException |
||
51 | */ |
||
52 | 5 | public function persist(Notification $notification): void |
|
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | public function notificationOfId(NotificationId $notificationId): ?Notification |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | 2 | public function hasNotificationOfDeduplicationKey(DeduplicationKey $deduplicationKey): bool |
|
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | 3 | public function freshNotifications(): array |
|
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | 4 | public function query( |
|
117 | |||
118 | /** |
||
119 | * {@inheritdoc} |
||
120 | * @throws ORMException |
||
121 | */ |
||
122 | 1 | public function remove(Notification $notification): void |
|
126 | |||
127 | /** |
||
128 | * {@inheritdoc} |
||
129 | * @throws ORMException |
||
130 | */ |
||
131 | 1 | public function removeAll(array $notifications): void |
|
137 | } |
||
138 |