Mercurial > hg > isophonics-drupal-site
annotate vendor/guzzlehttp/guzzle/src/Exception/SeekException.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 namespace GuzzleHttp\Exception; |
Chris@0 | 3 |
Chris@0 | 4 use Psr\Http\Message\StreamInterface; |
Chris@0 | 5 |
Chris@0 | 6 /** |
Chris@0 | 7 * Exception thrown when a seek fails on a stream. |
Chris@0 | 8 */ |
Chris@0 | 9 class SeekException extends \RuntimeException implements GuzzleException |
Chris@0 | 10 { |
Chris@0 | 11 private $stream; |
Chris@0 | 12 |
Chris@0 | 13 public function __construct(StreamInterface $stream, $pos = 0, $msg = '') |
Chris@0 | 14 { |
Chris@0 | 15 $this->stream = $stream; |
Chris@0 | 16 $msg = $msg ?: 'Could not seek the stream to position ' . $pos; |
Chris@0 | 17 parent::__construct($msg); |
Chris@0 | 18 } |
Chris@0 | 19 |
Chris@0 | 20 /** |
Chris@0 | 21 * @return StreamInterface |
Chris@0 | 22 */ |
Chris@0 | 23 public function getStream() |
Chris@0 | 24 { |
Chris@0 | 25 return $this->stream; |
Chris@0 | 26 } |
Chris@0 | 27 } |