Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
gilour
/
php-http
/
message
/
src
/
Encoding
:
ChunkStream.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace Http\Message\Encoding; /** * Transform a regular stream into a chunked one. * * @author Joel Wurtz <joel.wurtz@gmail.com> */ class ChunkStream extends FilteredStream { protected function readFilter(): string { return 'chunk'; } protected function writeFilter(): string { return 'dechunk'; } protected function fill(): void { parent::fill(); if ($this->stream->eof()) { $this->buffer .= "0\r\n\r\n"; } } }