CommunicationException.php 563 B

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