Fr3nch13/CakePHP Utilities

StreamFactory
in package
implements StreamFactoryInterface

Table of Contents

Interfaces

StreamFactoryInterface

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
StreamInterface

createStreamFromFile()

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
StreamInterface

createStreamFromResource()

Create a new stream from an existing resource.

public createStreamFromResource(mixed $resource) : StreamInterface
Parameters
$resource : mixed

PHP resource to use as basis of stream.

Return values
StreamInterface

        
On this page

Search results