mirror of
https://github.com/shufflingpixels/php-io.git
synced 2026-10-19 06:26:46 +02:00
Remove BinaryReader stream and string helpers
BinaryReader does not own the stream object. so we should not have a method that creates one (string) also remove stream() as its the same as the constructor.
This commit is contained in:
parent
0fa93d691c
commit
785e48a023
3 changed files with 14 additions and 32 deletions
|
|
@ -15,16 +15,6 @@ class BinaryReader
|
|||
{
|
||||
}
|
||||
|
||||
public static function stream(StreamInterface $stream)
|
||||
{
|
||||
return new self($stream);
|
||||
}
|
||||
|
||||
public static function string(string $data)
|
||||
{
|
||||
return self::stream(new Buffer($data));
|
||||
}
|
||||
|
||||
public function length() : int
|
||||
{
|
||||
$size = $this->stream->getSize();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue