CommunicationException.php 567 B

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