CommunicationException.php 538 B

123456789101112131415161718192021
  1. <?php
  2. namespace Predis;
  3. use Predis\Network\IConnection;
  4. use Predis\Network\IConnectionSingle;
  5. class CommunicationException extends PredisException {
  6. // Communication errors
  7. private $_connection;
  8. public function __construct(IConnectionSingle $connection,
  9. $message = null, $code = null) {
  10. $this->_connection = $connection;
  11. parent::__construct($message, $code);
  12. }
  13. public function getConnection() { return $this->_connection; }
  14. public function shouldResetConnection() { return true; }
  15. }