1 | <?php |
||
26 | class ListenerPooler extends ClientPooler |
||
27 | { |
||
28 | /** |
||
29 | * getPoolerType |
||
30 | * |
||
31 | * @see ClientPoolerInterface |
||
32 | */ |
||
33 | public function getPoolerType() |
||
37 | |||
38 | |||
39 | /** |
||
40 | * createClient |
||
41 | * |
||
42 | * See @ClientPooler |
||
43 | */ |
||
44 | protected function createClient($identifier) |
||
48 | |||
49 | /** |
||
50 | * notify |
||
51 | * |
||
52 | * Send a notification to clients. |
||
53 | * Client identifiers may be a single client name, an array of client or |
||
54 | * '*' to notify all clients. |
||
55 | * Event name may use ':' to split indicate additional information (ie type |
||
56 | * of payload). Events sent to 'pika', 'pika:chu' will both notify client |
||
57 | * 'pika'. |
||
58 | * |
||
59 | * @param string|array $identifiers |
||
60 | * @param array $data |
||
61 | * @return ListenerPooler $this |
||
62 | */ |
||
63 | public function notify($identifiers, array $data) |
||
83 | |||
84 | /** |
||
85 | * notifyAll |
||
86 | * |
||
87 | * Notify all existing clients. |
||
88 | * |
||
89 | * @param array $data |
||
90 | * @return ListenerPooler $this |
||
91 | */ |
||
92 | protected function notifyAll(array $data) |
||
102 | |||
103 | /** |
||
104 | * notifyClients |
||
105 | * |
||
106 | * Send a notification to the specified clients. |
||
107 | * |
||
108 | * @param array $identifiers |
||
109 | * @param array $data |
||
110 | * @return ListenerPooler $this |
||
111 | */ |
||
112 | protected function notifyClients(array $identifiers, array $data) |
||
132 | } |
||
133 |