public static function createRedisByConfig(array $config) {
        $Redis = new Connection();
        $Redis->setHost(@$config['host'])
            ->setPort(@$config['port']);
        (isset($config['persistent']))      && $Redis->setPersistent($config['persistent']);
        (isset($config['connect_timeout'])) && $Redis->setConnectTimeout($config['connect_timeout']);
        (isset($config['connect_tries']))   && $Redis->setConnectTries($config['connect_tries']);
        return $Redis;
    }
public static function createRedisByConfig(array $config) {
        $Redis = new Connection();
        $Redis->setHost(@$config['host'])
            ->setPort(@$config['port']);
        (isset($config['persistent']))      && $Redis->setPersistent($config['persistent']);
        (isset($config['connect_timeout'])) && $Redis->setConnectTimeout($config['connect_timeout']);
        (isset($config['connect_tries']))   && $Redis->setConnectTries($config['connect_tries']);
        return $Redis;
    }
public static function createRedisByConfig ( array $ config ) { $ Redis = new Connection ( ) ; $ Redis -> setHost ( @ $ config [ 'host' ] ) -> setPort ( @ $ config [ 'port' ] ) ; ( isset ( $ config [ 'persistent' ] ) ) && $ Redis -> setPersistent ( $ config [ 'persistent' ] ) ; ( isset ( $ config [ 'connect_timeout' ] ) ) && $ Redis -> setConnectTimeout ( $ config [ 'connect_timeout' ] ) ; ( isset ( $ config [ 'connect_tries' ] ) ) && $ Redis -> setConnectTries ( $ config [ 'connect_tries' ] ) ; return $ Redis ; }
Create PhpRedis instance by array config
@param array $config array configuration
@throws InvalidArgumentException
Create PhpRedis instance by array config