\Pop\Mail\Transport\Smtp\Stream\ByteInputInterface

Input byte stream interface

Summary

Methods
Constants
write()
commit()
bind()
unbind()
flushBuffers()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

write()

write(string  $bytes) : integer

Writes $bytes to the end of the stream.

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

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

Parameters

string $bytes

Throws

\Pop\Mail\Transport\Smtp\Stream\Byte\Exception

Returns

integer

commit()

commit() 

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

Throws

\Pop\Mail\Transport\Smtp\Stream\Byte\Exception

bind()

bind(\Pop\Mail\Transport\Smtp\Stream\Byte\InputInterface  $is) 

Attach $is to this stream.

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

Parameters

\Pop\Mail\Transport\Smtp\Stream\Byte\InputInterface $is

unbind()

unbind(\Pop\Mail\Transport\Smtp\Stream\Byte\InputInterface  $is) 

Remove an already bound stream.

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

\Pop\Mail\Transport\Smtp\Stream\Byte\InputInterface $is

flushBuffers()

flushBuffers() 

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

Throws

\Pop\Mail\Transport\Smtp\Stream\Byte\Exception