This class is intended to provide an optional low-overhead alternative for processing responses from Redis compared to the standard pure-PHP classes. Differences in speed when dealing with short inline responses are practically nonexistent, the actual speed boost is for big multibulk responses when this protocol processor can parse and return responses very fast. For instructions on how to build and install the phpiredis extension, please consult the repository of the project. The connection parameters supported by this class are: - scheme: it can be either 'tcp' or 'unix'. - host: hostname or IP address of the server. - port: TCP port of the server. - path: path of a UNIX domain socket when scheme is 'unix'. - timeout: timeout to perform the connection. - read_write_timeout: timeout of read / write operations. - async_connect: performs the connection asynchronously. - tcp_nodelay: enables or disables Nagle's algorithm for coalescing. - persistent: the connection is left intact after a GC collection.
Автор: Daniele Alessandri (suppakilla@gmail.com)
Наследование: extends StreamConnection
 /**
  * {@inheritdoc}
  */
 protected function getConnection(&$profile = null, $initialize = false, array $parameters = array())
 {
     $parameters = $this->getParameters($parameters);
     $profile = $this->getProfile();
     $connection = new PhpiredisStreamConnection($parameters);
     if ($initialize) {
         $connection->pushInitCommand($profile->createCommand('select', array($parameters->database)));
         $connection->pushInitCommand($profile->createCommand('flushdb'));
     }
     return $connection;
 }