Calls preg_replace on each read operation with the passed pattern and
replacement string. Should only really be used to find single characters,
since a pattern intended to match more may be split across multiple read()
operations.
- author Zaahid Bateson
- Implements
Psr\Http\Message\StreamInterface Stringable - Traits
Methods |
public __call(string $method, array $args) Allow decorators to implement custom methods
|
public __construct(Psr\Http\Message\StreamInterface $stream, string $pattern, string $replacement) |
public __get(string $name) Magic method used to create a new stream if streams are not added in
|
public __toString() : string |
public close() : void |
public detach() |
public eof() : bool Returns true if the end of stream has been reached. |
public getContents() : string |
public getMetadata( $key = NULL)
|
public getSize() : ?int |
public isReadable() : bool |
public isSeekable() : bool Overridden to return false |
public isWritable() : bool |
public read( $length) : string Reads from the underlying stream, filters it and returns up to $length
|
public rewind() : void |
public seek( $offset, $whence = 0ZBateson\StreamDecorators\SEEK_SET) : void Not supported by PregReplaceFilterStream
|
public tell() : int |
public write( $string) : int |
Methods |
protected createStream() : Psr\Http\Message\StreamInterface Implement in subclasses to dynamically create streams when requested.
|
Properties |
private $buffer = NULL
|
private $pattern = NULL
|
private $replacement = NULL
|
private $stream = NULL
|
Methods |
private fillBuffer(int $length) : void Fills the BufferStream with at least 8192 characters of input for future |