original_string: protected function _connection(array $config)
      {
          $redis = new \Redis;
          $host = empty($config['host']) ? self::DEFAULT_HOST : $config['host'];
          $port = empty($config['port']) ? self::DEFAULT_PORT : $config['port'];
          $timeout = empty($config['timeout']) ? self::DEFAULT_TIMEOUT : $config['timeout'];
          $connect = empty($config['persistent']) ? 'connect' : 'pconnect';
          $redis->$connect($host, $port, $timeout);
          return $redis;
      }
code: protected function _connection(array $config)
      {
          $redis = new \Redis;
          $host = empty($config['host']) ? self::DEFAULT_HOST : $config['host'];
          $port = empty($config['port']) ? self::DEFAULT_PORT : $config['port'];
          $timeout = empty($config['timeout']) ? self::DEFAULT_TIMEOUT : $config['timeout'];
          $connect = empty($config['persistent']) ? 'connect' : 'pconnect';
          $redis->$connect($host, $port, $timeout);
          return $redis;
      }
code_tokens: protected function _connection ( array $ config ) { $ redis = new \ Redis ; $ host = empty ( $ config [ 'host' ] ) ? self :: DEFAULT_HOST : $ config [ 'host' ] ; $ port = empty ( $ config [ 'port' ] ) ? self :: DEFAULT_PORT : $ config [ 'port' ] ; $ timeout = empty ( $ config [ 'timeout' ] ) ? self :: DEFAULT_TIMEOUT : $ config [ 'timeout' ] ; $ connect = empty ( $ config [ 'persistent' ] ) ? 'connect' : 'pconnect' ; $ redis -> $ connect ( $ host , $ port , $ timeout ) ; return $ redis ; }
docstring: Redis connect and return the redis instance
  
  @param array $config The config
  @return \Redis
docstring_tokens: Redis connect and return the redis instance