1 | <?php |
||
20 | class Service |
||
21 | { |
||
22 | /** |
||
23 | * @var \Doctrine\Common\Collections\ArrayCollection |
||
24 | */ |
||
25 | protected $adapters; |
||
26 | |||
27 | /** |
||
28 | * @var \Doctrine\Common\Collections\ArrayCollection |
||
29 | */ |
||
30 | protected $notifications; |
||
31 | |||
32 | /** |
||
33 | * Manager constructor. |
||
34 | * |
||
35 | * @param \Jgut\Tify\Adapter\AbstractAdapter|\Jgut\Tify\Adapter\AbstractAdapter[]|null $adapters |
||
36 | * @param \Jgut\Tify\Notification|\Jgut\Tify\Notification[]|null $notifications |
||
37 | */ |
||
38 | public function __construct($adapters = null, $notifications = null) |
||
58 | |||
59 | /** |
||
60 | * Retrieve registered adapters. |
||
61 | * |
||
62 | * @return \Jgut\Tify\Adapter\AbstractAdapter[] |
||
63 | */ |
||
64 | public function getAdapters() |
||
68 | |||
69 | /** |
||
70 | * Register adapters. |
||
71 | * |
||
72 | * @param array $adapters |
||
73 | * |
||
74 | * @return $this |
||
75 | */ |
||
76 | public function setAdapters(array $adapters) |
||
86 | |||
87 | /** |
||
88 | * Register adapter. |
||
89 | * |
||
90 | * @param \Jgut\Tify\Adapter\AbstractAdapter $adapter |
||
91 | * |
||
92 | * @return $this |
||
93 | */ |
||
94 | public function addAdapter(AbstractAdapter $adapter) |
||
100 | |||
101 | /** |
||
102 | * Clear list of adapters. |
||
103 | */ |
||
104 | public function clearAdapters() |
||
110 | |||
111 | /** |
||
112 | * Retrieve registered notifications. |
||
113 | * |
||
114 | * @return \Jgut\Tify\Notification[] |
||
115 | */ |
||
116 | public function getNotifications() |
||
120 | |||
121 | /** |
||
122 | * Register notifications. |
||
123 | * |
||
124 | * @param array $notifications |
||
125 | * |
||
126 | * @return $this |
||
127 | */ |
||
128 | public function setNotifications(array $notifications) |
||
138 | |||
139 | /** |
||
140 | * Register notification. |
||
141 | * |
||
142 | * @param \Jgut\Tify\Notification $notification |
||
143 | * |
||
144 | * @return $this |
||
145 | */ |
||
146 | public function addNotification(Notification $notification) |
||
152 | |||
153 | /** |
||
154 | * Clear list of notifications. |
||
155 | */ |
||
156 | public function clearNotifications() |
||
162 | |||
163 | /** |
||
164 | * Push notifications. |
||
165 | * |
||
166 | * @return \Jgut\Tify\Result[] |
||
167 | */ |
||
168 | public function push() |
||
190 | |||
191 | /** |
||
192 | * Get feedback from push services. |
||
193 | * |
||
194 | * @return \Jgut\Tify\Result[] |
||
195 | */ |
||
196 | public function feedback() |
||
216 | } |
||
217 |