Documentation

InputInterface
in

Input byte stream interface

Tags
category

Pop

author

Chris Corbyn, from the SwiftMailer library https://github.com/swiftmailer/swiftmailer

version
4.0.0

Table of Contents

Methods

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.
unbind()  : void
Remove an already bound stream.
write()  : mixed
Writes $bytes to the end of the stream.

Methods

bind()

Attach $is to this stream.

public bind(InputInterface $is) : void

The stream acts as an observer, receiving all data that is written. All and operations will be mirrored.

Parameters
$is : InputInterface

commit()

For any bytes that are currently buffered inside the stream, force them off the buffer.

public commit() : void
Tags
throws
Exception

flushBuffers()

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

public flushBuffers() : void
Tags
throws
Exception

unbind()

Remove an already bound stream.

public unbind(InputInterface $is) : void

If $is is not bound, no errors will be raised. If the stream currently has any buffered data it will be written to $is before unbinding occurs.

Parameters
$is : InputInterface

write()

Writes $bytes to the end of the stream.

public write(string $bytes) : mixed

Writing may not happen immediately if the stream chooses to buffer. If you want to write these bytes with immediate effect, call after calling write().

This method returns the sequence ID of the write (i.e. 1 for first, 2 for second, etc etc).

Parameters
$bytes : string
Tags
throws
Exception

        
On this page

Search results