No Description

SeekException.php 588B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace GuzzleHttp\Exception;
  3. use Psr\Http\Message\StreamInterface;
  4. /**
  5. * Exception thrown when a seek fails on a stream.
  6. */
  7. class SeekException extends \RuntimeException implements GuzzleException
  8. {
  9. private $stream;
  10. public function __construct(StreamInterface $stream, $pos = 0, $msg = '')
  11. {
  12. $this->stream = $stream;
  13. $msg = $msg ?: 'Could not seek the stream to position ' . $pos;
  14. parent::__construct($msg);
  15. }
  16. /**
  17. * @return StreamInterface
  18. */
  19. public function getStream()
  20. {
  21. return $this->stream;
  22. }
  23. }