@@ 197-216 (lines=20) @@ | ||
194 | * |
|
195 | * @return WordPoints_Hook_ReactionI[] All of the reaction objects. |
|
196 | */ |
|
197 | public function get_all_reactions_to_event( $event_slug ) { |
|
198 | ||
199 | $reactions = array(); |
|
200 | ||
201 | foreach ( array( 'standard', 'network' ) as $store ) { |
|
202 | ||
203 | $storage = $this->{"{$store}_reactions"}; |
|
204 | ||
205 | if ( ! $storage instanceof WordPoints_Hook_Reaction_StorageI ) { |
|
206 | continue; |
|
207 | } |
|
208 | ||
209 | $reactions = array_merge( |
|
210 | $reactions |
|
211 | , $storage->get_reactions_to_event( $event_slug ) |
|
212 | ); |
|
213 | } |
|
214 | ||
215 | return $reactions; |
|
216 | } |
|
217 | ||
218 | /** |
|
219 | * Get all reactions for this reactor. |
|
@@ 229-245 (lines=17) @@ | ||
226 | * |
|
227 | * @return WordPoints_Hook_ReactionI[] All of the reaction objects. |
|
228 | */ |
|
229 | public function get_all_reactions() { |
|
230 | ||
231 | $reactions = array(); |
|
232 | ||
233 | foreach ( array( 'standard', 'network' ) as $store ) { |
|
234 | ||
235 | $storage = $this->{"{$store}_reactions"}; |
|
236 | ||
237 | if ( ! $storage instanceof WordPoints_Hook_Reaction_StorageI ) { |
|
238 | continue; |
|
239 | } |
|
240 | ||
241 | $reactions = array_merge( $reactions, $storage->get_reactions() ); |
|
242 | } |
|
243 | ||
244 | return $reactions; |
|
245 | } |
|
246 | ||
247 | /** |
|
248 | * @since 1.0.0 |