public function __construct(array $params, Driver $driver, Configuration $config = null, EventManager $eventManager = null)
{
if (!$driver instanceof ServerGoneAwayExceptionsAwareInterface) {
throw new \InvalidArgumentException(sprintf('%s needs a driver that implements ServerGoneAwayExceptionsAwareInterface', get_class($this)));
}
if (isset($params['driverOptions']['x_reconnect_attempts'])) {
$this->reconnectAttempts = (int) $params['driverOptions']['x_reconnect_attempts'];
}
parent::__construct($params, $driver, $config, $eventManager);
}