Overview

Namespaces

  • Docta
    • MercadoLibre
      • Exception
      • OAuth2
        • Client
          • Test
  • GuzzleHttp
    • Cookie
    • Exception
    • Handler
    • Promise
      • Test
      • Tests
    • Psr7
    • Test
      • Handler
    • Tests
      • CookieJar
      • Event
      • Exception
      • Handler
      • Promise
      • Psr7
  • League
    • OAuth2
      • Client
        • Grant
          • Exception
        • Provider
          • Exception
        • Test
          • Grant
          • Provider
            • Exception
            • Fake
          • Token
          • Tool
        • Token
        • Tool
  • None
  • Psr
    • Http
      • Message

Classes

  • AppendStream
  • BufferStream
  • CachingStream
  • DroppingStream
  • FnStream
  • InflateStream
  • LazyOpenStream
  • LimitStream
  • MultipartStream
  • NoSeekStream
  • PumpStream
  • Request
  • Response
  • ServerRequest
  • Stream
  • StreamWrapper
  • UploadedFile
  • Uri
  • UriNormalizer
  • UriResolver

Traits

  • MessageTrait
  • StreamDecoratorTrait

Functions

  • build_query
  • copy_to_stream
  • copy_to_string
  • fread
  • hash
  • mimetype_from_extension
  • mimetype_from_filename
  • modify_request
  • normalize_header
  • parse_header
  • parse_query
  • parse_request
  • parse_response
  • readline
  • rewind_body
  • str
  • stream_for
  • try_fopen
  • uri_for
  • Overview
  • Namespace
  • Class
  • Download

Trait StreamDecoratorTrait

Stream decorator trait

Direct Known Users

GuzzleHttp\Psr7\CachingStream, GuzzleHttp\Psr7\DroppingStream, GuzzleHttp\Psr7\InflateStream, GuzzleHttp\Psr7\LazyOpenStream, GuzzleHttp\Psr7\LimitStream, GuzzleHttp\Psr7\MultipartStream, GuzzleHttp\Psr7\NoSeekStream, GuzzleHttp\Tests\Psr7\BadStream, GuzzleHttp\Tests\Psr7\Str
Namespace: GuzzleHttp\Psr7
Located at src/StreamDecoratorTrait.php
Methods summary
public
# __construct( Psr\Http\Message\StreamInterface $stream )

Parameters

$stream
Stream to decorate
public Psr\Http\Message\StreamInterface
# __get( string $name )

Magic method used to create a new stream if streams are not added in the constructor of a decorator (e.g., LazyOpenStream).

Magic method used to create a new stream if streams are not added in the constructor of a decorator (e.g., LazyOpenStream).

Parameters

$name
Name of the property (allows "stream" only).

Returns

Psr\Http\Message\StreamInterface
public
# __toString( )
public
# getContents( )
public mixed
# __call( string $method, array $args )

Allow decorators to implement custom methods

Allow decorators to implement custom methods

Parameters

$method
Missing method name
$args
Method arguments

Returns

mixed
public
# close( )
public
# getMetadata( $key = null )
public
# detach( )
public
# getSize( )
public
# eof( )
public
# tell( )
public
# isReadable( )
public
# isWritable( )
public
# isSeekable( )
public
# rewind( )
public
# seek( $offset, $whence = SEEK_SET )
public
# read( $length )
public
# write( $string )
protected Psr\Http\Message\StreamInterface
# createStream( )

Implement in subclasses to dynamically create streams when requested.

Implement in subclasses to dynamically create streams when requested.

Returns

Psr\Http\Message\StreamInterface

Throws

BadMethodCallException
MercadoLibre PHP SDK API documentation generated by ApiGen