get(ConfigInterface::class); $key = sprintf('redis.%s', $this->name); if (! $config->has($key)) { throw new InvalidArgumentException(sprintf('config[%s] is not exist!', $key)); } $this->config = $config->get($key); $options = Arr::get($this->config, 'pool', []); $this->frequency = make(Frequency::class, [$this]); parent::__construct($container, $options); } public function getName(): string { return $this->name; } public function getConfig(): array { return $this->config; } protected function createConnection(): ConnectionInterface { return new RedisConnection($this->container, $this, $this->config); } }