CommunicationException.php 567 B

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