|
Last change
on this file since 7271978 was 01a620f, checked in by Joachim Langenbach <joachim.langenbach@…>, 11 years ago |
|
Removed submodules for php externals and use composer to provide them and versioned them afterwards
|
-
Property mode
set to
100644
|
|
File size:
588 bytes
|
| Line | |
|---|
| 1 | <?php
|
|---|
| 2 | namespace GuzzleHttp\Exception;
|
|---|
| 3 |
|
|---|
| 4 | use Psr\Http\Message\StreamInterface;
|
|---|
| 5 |
|
|---|
| 6 | /**
|
|---|
| 7 | * Exception thrown when a seek fails on a stream.
|
|---|
| 8 | */
|
|---|
| 9 | class SeekException extends \RuntimeException implements GuzzleException
|
|---|
| 10 | {
|
|---|
| 11 | private $stream;
|
|---|
| 12 |
|
|---|
| 13 | public function __construct(StreamInterface $stream, $pos = 0, $msg = '')
|
|---|
| 14 | {
|
|---|
| 15 | $this->stream = $stream;
|
|---|
| 16 | $msg = $msg ?: 'Could not seek the stream to position ' . $pos;
|
|---|
| 17 | parent::__construct($msg);
|
|---|
| 18 | }
|
|---|
| 19 |
|
|---|
| 20 | /**
|
|---|
| 21 | * @return StreamInterface
|
|---|
| 22 | */
|
|---|
| 23 | public function getStream()
|
|---|
| 24 | {
|
|---|
| 25 | return $this->stream;
|
|---|
| 26 | }
|
|---|
| 27 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.