-
Notifications
You must be signed in to change notification settings - Fork 1
StreamFactory: createStreamFromResource Example
Terry L edited this page Jun 21, 2020
·
4 revisions
Shieldon\Psr17\StreamFactory
Create a new stream from an existing resource.
-
param
stringresource*The PHP resource to use as the basis for the stream. -
return
StreamInterface
Example:
$streamFactory = new StreamFactory();
$stream = $streamFactory->createStreamResource(
fopen('php://temp', 'r+')
);composer require shieldon/psr-httpShieldon PSR HTTP implementation written by Terry L. from Taiwan.
