-
Notifications
You must be signed in to change notification settings - Fork 1
StreamFactory: createStream Example
Terry L edited this page Jun 21, 2020
·
4 revisions
Shieldon\Psr17\StreamFactory
Create a new stream from a string. The stream will be created with a temporary resource.
-
param
stringcontent= ""String content with which to populate the stream. -
return
StreamInterface
Example:
$streamFactory = new StreamFactory();
$stream = $streamFactory->createStream('Foo Bar');
echo $stream;
// Outputs: Foo Barcomposer require shieldon/psr-httpShieldon PSR HTTP implementation written by Terry L. from Taiwan.
