src/mako/redis/ConnectionManager.php
protected function connect(string $connection): Redis
	{
		if(!isset($this->configurations[$connection]))
		{
			throw new RuntimeException(vsprintf('[ %s ] has not been defined in the redis configuration.', [$connection]));
		}

		$config = $this->configurations[$connection];

		return new Redis(new Connection($config['host'], $config['port'], $config['persistent'] ?? false, $config['timeout'] ?? 60, $connection), $config);
	}
protected function connect(string $connection): Redis
	{
		if(!isset($this->configurations[$connection]))
		{
			throw new RuntimeException(vsprintf('[ %s ] has not been defined in the redis configuration.', [$connection]));
		}

		$config = $this->configurations[$connection];

		return new Redis(new Connection($config['host'], $config['port'], $config['persistent'] ?? false, $config['timeout'] ?? 60, $connection), $config);
	}
protected function connect ( string $ connection ) : Redis { if ( ! isset ( $ this -> configurations [ $ connection ] ) ) { throw new RuntimeException ( vsprintf ( '[ %s ] has not been defined in the redis configuration.' , [ $ connection ] ) ) ; } $ config = $ this -> configurations [ $ connection ] ; return new Redis ( new Connection ( $ config [ 'host' ] , $ config [ 'port' ] , $ config [ 'persistent' ] ?? false , $ config [ 'timeout' ] ?? 60 , $ connection ) , $ config ) ; }
Connects to the chosen redis configuration and returns the connection.

@param  string            $connection Connection name
@throws \RuntimeException
@return \mako\redis\Redis
Connects to the chosen redis configuration and returns the connection .