You are here

public function UploadedFileInterface::getStream in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/psr/http-message/src/UploadedFileInterface.php \Psr\Http\Message\UploadedFileInterface::getStream()

Retrieve a stream representing the uploaded file.

This method MUST return a StreamInterface instance, representing the uploaded file. The purpose of this method is to allow utilizing native PHP stream functionality to manipulate the file upload, such as stream_copy_to_stream() (though the result will need to be decorated in a native PHP stream wrapper to work with such functions).

If the moveTo() method has been called previously, this method MUST raise an exception.

Return value

StreamInterface Stream representation of the uploaded file.

Throws

\RuntimeException in cases when no stream is available or can be created.

2 methods override UploadedFileInterface::getStream()
UploadedFile::getStream in vendor/zendframework/zend-diactoros/src/UploadedFile.php
UploadedFile::getStream in vendor/symfony/psr-http-message-bridge/Tests/Fixtures/UploadedFile.php
Retrieve a stream representing the uploaded file.

File

vendor/psr/http-message/src/UploadedFileInterface.php, line 31

Class

UploadedFileInterface
Value object representing a file uploaded through an HTTP request.

Namespace

Psr\Http\Message

Code

public function getStream();