1 | <?php |
||
27 | class RedisSentinelServiceProvider extends ServiceProvider |
||
28 | { |
||
29 | /** |
||
30 | * Loads the package's configuration and provides configuration values. |
||
31 | * |
||
32 | * @var ConfigurationLoader |
||
33 | */ |
||
34 | protected $config; |
||
35 | |||
36 | /** |
||
37 | * Boot the service by registering extensions with Laravel's cache, queue, |
||
38 | * and session managers for the "redis-sentinel" driver. |
||
39 | * |
||
40 | * @return void |
||
41 | */ |
||
42 | public function boot() |
||
59 | |||
60 | /** |
||
61 | * Bind the "redis-sentinel" database driver to the application service |
||
62 | * container. |
||
63 | * |
||
64 | * @return void |
||
65 | */ |
||
66 | public function register() |
||
85 | |||
86 | /** |
||
87 | * Replace the standard Laravel Redis service with the Redis Sentinel |
||
88 | * database driver so all Redis operations use Sentinel connections. |
||
89 | * |
||
90 | * @return void |
||
91 | */ |
||
92 | protected function registerOverrides() |
||
102 | |||
103 | /** |
||
104 | * Remove the standard Laravel Redis service from the bound deferred |
||
105 | * services so they don't overwrite Redis Sentinel registrations. |
||
106 | * |
||
107 | * @return void |
||
|
|||
108 | */ |
||
109 | protected function removeDeferredRedisServices() |
||
122 | |||
123 | /** |
||
124 | * Add "redis-sentinel" as an available driver option to the Laravel cache |
||
125 | * manager. |
||
126 | * |
||
127 | * @param CacheManager $cache The Laravel cache manager |
||
128 | * |
||
129 | * @return void |
||
130 | */ |
||
131 | protected function addRedisSentinelCacheDriver(CacheManager $cache) |
||
142 | |||
143 | /** |
||
144 | * Add "redis-sentinel" as an available driver option to the Laravel |
||
145 | * session manager. |
||
146 | * |
||
147 | * @param SessionManager $session The Laravel session manager |
||
148 | * |
||
149 | * @return void |
||
150 | */ |
||
151 | protected function addRedisSentinelSessionHandler(SessionManager $session) |
||
164 | |||
165 | /** |
||
166 | * Add "redis-sentinel" as an available queue connection driver option to |
||
167 | * the Laravel queue manager. |
||
168 | * |
||
169 | * @param QueueManager $queue The Laravel queue manager |
||
170 | * |
||
171 | * @return void |
||
172 | */ |
||
173 | protected function addRedisSentinelQueueConnector(QueueManager $queue) |
||
181 | |||
182 | /** |
||
183 | * Get the fully-qualified class name of the RedisSentinelManager class |
||
184 | * for the current version of Laravel or Lumen. |
||
185 | * |
||
186 | * @return string The class name of the appropriate RedisSentinelManager |
||
187 | * with its namespace |
||
188 | */ |
||
189 | protected function getVersionedRedisSentinelManagerClass() |
||
205 | } |
||
206 |
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.