getHashGeneratorByDescription($options, $value); } elseif ($value instanceof Hash\HashGeneratorInterface) { return $value; } else { $class = get_class($this); throw new InvalidArgumentException("$class expects a valid hash generator"); } } /** * {@inheritdoc} */ public function getDefault(OptionsInterface $options) { return function_exists('phpiredis_utils_crc16') ? new Hash\PhpiredisCRC16() : new Hash\CRC16(); } }