Documentation

TemporaryFileByteStream extends FileByteStream
in package

Temporary file byte stream class

Tags
category

Pop

author

Romain-Geissler from the SwiftMailer library https://github.com/swiftmailer/swiftmailer

version
4.0.7

Table of Contents

Properties

$sequence  : int
Write sequence

Methods

__construct()  : mixed
Create a new TemporaryFileByteStream
__destruct()  : mixed
Destructor
addFilter()  : void
Add a StreamFilter to this InputByteStream
bind()  : void
Attach $is to this stream.
commit()  : void
For any bytes that are currently buffered inside the stream, force them off the buffer
flushBuffers()  : void
Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
getContent()  : string
Get content
getPath()  : string
Get the complete path to the file
read()  : string|bool
Reads $length bytes from the stream into a string and moves the pointer through the stream by $length.
removeFilter()  : void
Remove an already present StreamFilter based on its $key
setReadPointer()  : void
Move the internal read pointer to $byteOffset in the stream
unbind()  : void
Remove an already bound stream.
write()  : mixed
Writes $bytes to the end of the stream
commitBytes()  : int
Just write the bytes to the file
flush()  : void
Not used

Properties

Methods

flushBuffers()

Flush the contents of the stream (empty it) and set the internal pointer to the beginning.

public flushBuffers() : void

getPath()

Get the complete path to the file

public getPath() : string
Return values
string

read()

Reads $length bytes from the stream into a string and moves the pointer through the stream by $length.

public read(int|string $length) : string|bool

If less bytes exist than are requested the remaining bytes are given instead. If no bytes are remaining at all, bool false is returned.

Parameters
$length : int|string
Tags
throws
Exception
Return values
string|bool

removeFilter()

Remove an already present StreamFilter based on its $key

public removeFilter(string $key) : void
Parameters
$key : string

setReadPointer()

Move the internal read pointer to $byteOffset in the stream

public setReadPointer(int|string $byteOffset) : void
Parameters
$byteOffset : int|string

commitBytes()

Just write the bytes to the file

protected commitBytes(string $bytes) : int
Parameters
$bytes : string
Return values
int

        
On this page

Search results