Skip to content
  • This project
    • Loading...
  • Sign in

Tenzing / banners-with-skip

Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • banners-with-skip
  • vendor
  • guzzlehttp
  • streams
  • src
  • NoSeekStream.php
  • Jeff Balicki's avatar
    Revert "Revert "google oauth"" · cf7a1676 ...
    cf7a1676
    This reverts commit a4f2f371.
    Jeff Balicki committed 2017-01-12 17:52:42 -0500
NoSeekStream.php 431 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
<?php
namespace GuzzleHttp\Stream;

/**
 * Stream decorator that prevents a stream from being seeked
 */
class NoSeekStream implements StreamInterface
{
    use StreamDecoratorTrait;

    public function seek($offset, $whence = SEEK_SET)
    {
        return false;
    }

    public function isSeekable()
    {
        return false;
    }

    public function attach($stream)
    {
        $this->stream->attach($stream);
    }
}