class TransformStream extends EventEmitter implements TransformStreamInterface
A stream that applies a transform.
Methods
__construct(TransformInterface $transform, integer|null $bufferSize = null)
Construct a new data transform stream. |
||
TransformInterface |
transform()
Get the transform. |
|
integer |
bufferSize()
Get the buffer size. |
|
boolean |
isWritable()
Returns true if this stream is writable. |
|
boolean |
isReadable()
Returns true if this stream is readable. |
|
boolean |
write(string $data)
Write some data to be transformed. |
|
end(string|null $data = null)
Transform and finalize any remaining buffered data. |
||
close()
Close this stream. |
||
pause()
Pause this stream. |
||
resume()
Resume this stream. |
||
WritableStreamInterface |
pipe(WritableStreamInterface $destination, array $options = array())
Pipe the output of this stream to another stream. |
Details
at line 29
public
__construct(TransformInterface $transform, integer|null $bufferSize = null)
Construct a new data transform stream.
at line 55
public TransformInterface
transform()
Get the transform.
at line 65
public integer
bufferSize()
Get the buffer size.
at line 75
public boolean
isWritable()
Returns true if this stream is writable.
at line 85
public boolean
isReadable()
Returns true if this stream is readable.
at line 97
public boolean
write(string $data)
Write some data to be transformed.
at line 119
public
end(string|null $data = null)
Transform and finalize any remaining buffered data.
at line 136
public
close()
Close this stream.
at line 148
public
pause()
Pause this stream.
at line 156
public
resume()
Resume this stream.
at line 170
public WritableStreamInterface
pipe(WritableStreamInterface $destination, array $options = array())
Pipe the output of this stream to another stream.