CommunicationException.php 506 B

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