1 | <?php |
||
19 | class PredisConnector |
||
20 | { |
||
21 | /** |
||
22 | * Configuration options specific to Sentinel connection operation |
||
23 | * |
||
24 | * We cannot pass these options as an array to the Predis client. |
||
25 | * Instead, we'll set them on the connection directly using methods |
||
26 | * provided by the SentinelReplication class of the Predis package. |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $sentinelConnectionOptionKeys = [ |
||
31 | 'sentinel_timeout', |
||
32 | 'retry_wait', |
||
33 | 'retry_limit', |
||
34 | 'update_sentinels', |
||
35 | ]; |
||
36 | |||
37 | /** |
||
38 | * Create a new Redis Sentinel connection from the provided configuration |
||
39 | * options |
||
40 | * |
||
41 | * @param array $server The client configuration for the connection |
||
42 | * @param array $options The global client options shared by all Sentinel |
||
43 | * connections |
||
44 | * |
||
45 | * @return PredisConnection The Sentinel connection containing a configured |
||
46 | * Predis Client |
||
47 | */ |
||
48 | public function connect(array $server, array $options = [ ]) |
||
71 | |||
72 | /** |
||
73 | * Create a Predis Client instance configured with the provided options |
||
74 | * |
||
75 | * @param array $server The client configuration for the connection |
||
76 | * @param array $clientOpts Non-sentinel client options |
||
77 | * @param array $sentinelOpts Sentinel-specific options |
||
78 | * |
||
79 | * @return void |
||
|
|||
80 | */ |
||
81 | protected function makePredisClient( |
||
99 | } |
||
100 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.