Index Documentation

StreamContent
in package
implements IHttpContent

Represents Stream body content for a HTTP message.

Table of Contents

Interfaces

IHttpContent
Represents the body content for a HTTP message.

Methods

__construct()  : mixed
__toString()  : string
fromFile()  : StreamContent
Creates an instance from a file.
fromRequest()  : StreamContent
Creates an instance from the raw request body.
getStream()  : Stream
Retrieves the underlying stream.

Methods

__construct()

public __construct(Stream $stream) : mixed
Parameters
$stream : Stream

Stream that represents this message body.

__toString()

public __toString() : string
Return values
string

fromFile()

Creates an instance from a file.

public static fromFile(string $path) : StreamContent
Parameters
$path : string

Path to the file.

Return values
StreamContent

Instance representing the provided path.


        
On this page

Search results