The connection parameters supported by this class are:.
- scheme: it can be either 'redis', 'tcp', 'rediss', 'tls' 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 (default is 5 seconds).
- 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.
- ssl: context options array (see http://php.net/manual/en/context.ssl.php)
public function readResponse(CommandInterface $command) { $response = parent::readResponse($command); $this->storeDebug($command, '<-'); return $response; }
/** * {@inheritdoc} */ public function __sleep() { return array_merge(parent::__sleep(), array('protocol')); }
/** * {@inheritdoc} */ public function __sleep() { return array_diff(parent::__sleep(), array('mbiterable')); }
/** * {@inheritdoc} */ public function __sleep() { return array_diff(array_merge(parent::__sleep(), array('protocol')), array('mbiterable')); }
/** * {@inheritdoc} */ public function __destruct() { phpiredis_reader_destroy($this->reader); parent::__destruct(); }
/** * {@inheritdoc} */ protected function getConnection(&$profile = null, $initialize = false, array $parameters = array()) { $parameters = $this->getParameters($parameters); $profile = $this->getProfile(); $connection = new StreamConnection($parameters); if ($initialize) { $connection->pushInitCommand($profile->createCommand('select', array($parameters->database))); $connection->pushInitCommand($profile->createCommand('flushdb')); } return $connection; }