$this->id = $id;
}
- /**
- * @param LoggerInterface $logger
- * @return null
- */
public function setLogger( LoggerInterface $logger ) {
$this->logger = $logger;
}
* @param string $server A hostname/port combination or the absolute path of a UNIX socket.
* If a hostname is specified but no port, port 6379 will be used.
* @param LoggerInterface|null $logger PSR-3 logger intance. [optional]
- * @return RedisConnRef|bool Returns false on failure
+ * @return RedisConnRef|Redis|bool Returns false on failure
* @throws MWException
*/
public function getConnection( $server, LoggerInterface $logger = null ) {
+ // The above @return also documents 'Redis' for convenience with IDEs.
+ // RedisConnRef uses PHP magic methods, which wouldn't be recognised.
+
$logger = $logger ?: $this->logger;
// Check the listing "dead" servers which have had a connection errors.
// Servers are marked dead for a limited period of time, to