1 | <?php |
||
9 | abstract class AbstractDriver implements Driver |
||
10 | { |
||
11 | /** |
||
12 | * Validate queue options |
||
13 | * |
||
14 | * @param array $options |
||
15 | * |
||
16 | * @return array |
||
17 | * @throws InvalidOptionsException |
||
18 | */ |
||
19 | final public function validateQueueOptions(array $options) |
||
20 | { |
||
21 | $resolver = new OptionsResolver(); |
||
22 | $this->configureQueueOptions($resolver); |
||
23 | |||
24 | return $resolver->resolve($options); |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * Validate queue options |
||
29 | * |
||
30 | * @param array $options |
||
31 | * |
||
32 | * @return array |
||
33 | * @throws InvalidOptionsException |
||
34 | */ |
||
35 | final public function validatePushOptions(array $options) |
||
36 | { |
||
37 | $resolver = new OptionsResolver(); |
||
38 | $this->configurePushOptions($resolver); |
||
39 | |||
40 | return $resolver->resolve($options); |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * Configure createQueue options |
||
45 | * |
||
46 | * @param OptionsResolver $resolver |
||
47 | */ |
||
48 | public function configureQueueOptions(OptionsResolver $resolver) |
||
51 | |||
52 | /** |
||
53 | * Configure push message options |
||
54 | * |
||
55 | * @param OptionsResolver $resolver |
||
56 | */ |
||
57 | public function configurePushOptions(OptionsResolver $resolver) |
||
60 | } |
||
61 |