$sequence
$sequence : integer
Write sequence
Stream buffer class
$replacementFactory : \Pop\Mail\Transport\Smtp\Stream\Filter\ReplacementFactoryInterface
The ReplacementFilterFactory
addFilter(\Pop\Mail\Transport\Smtp\Stream\FilterInterface $filter, string $key)
Add a StreamFilter to this InputByteStream
\Pop\Mail\Transport\Smtp\Stream\FilterInterface | $filter | |
string | $key |
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 \Pop\Mail\Transport\Smtp\Stream\Byte\commit() after calling write().
This method returns the sequence ID of the write (i.e. 1 for first, 2 for second, etc etc).
string | $bytes |
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 \Pop\Mail\Transport\Smtp\Stream\Byte\write() and \Pop\Mail\Transport\Smtp\Stream\Byte\flushBuffers() operations will be mirrored.
\Pop\Mail\Transport\Smtp\Stream\Byte\InputInterface | $is |
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.
\Pop\Mail\Transport\Smtp\Stream\Byte\InputInterface | $is |
__construct(\Pop\Mail\Transport\Smtp\Stream\Filter\ReplacementFactoryInterface $replacementFactory)
Create a new StreamBuffer using $replacementFactory for transformations.
\Pop\Mail\Transport\Smtp\Stream\Filter\ReplacementFactoryInterface | $replacementFactory |
readLine(integer $sequence) : string
Get a line of output (including any CRLF).
The $sequence number comes from any writes and may or may not be used depending upon the implementation.
integer | $sequence | of last write to scan from |
read(integer $length) : string|boolean
Reads $length bytes from the stream into a string and moves the pointer through the stream by $length.
If less bytes exist than are requested the remaining bytes are given instead. If no bytes are remaining at all, boolean false is returned.
integer | $length |