StreamFactory
in package
implements
StreamFactoryInterface
Table of Contents
Interfaces
Methods
- createStream() : StreamInterface
- Create a new stream from a string.
- createStreamFromFile() : StreamInterface
- Create a stream from an existing file.
- createStreamFromResource() : StreamInterface
- Create a new stream from an existing resource.
Methods
createStream()
Create a new stream from a string.
public
createStream([string $content = '' ]) : StreamInterface
Parameters
- $content : string = ''
-
String content with which to populate the stream.
Return values
StreamInterfacecreateStreamFromFile()
Create a stream from an existing file.
public
createStreamFromFile(string $file[, string $mode = 'r' ]) : StreamInterface
Parameters
- $file : string
- $mode : string = 'r'
-
Mode with which to open the underlying filename/stream.
Return values
StreamInterfacecreateStreamFromResource()
Create a new stream from an existing resource.
public
createStreamFromResource(mixed $resource) : StreamInterface
Parameters
- $resource : mixed
-
PHP resource to use as basis of stream.