File tree Expand file tree Collapse file tree 5 files changed +17
-9
lines changed Expand file tree Collapse file tree 5 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 11# Change Log
22
33
4+ ## Unreleased
5+
6+ ### Added
7+
8+ - Autoregistration of stream filters using Composer autoload
9+
10+
411## 0.1.2 - 2015-12-26
512
613### Added
Original file line number Diff line number Diff line change 3131 "autoload" : {
3232 "psr-4" : {
3333 "Http\\ Message\\ " : " src/"
34- }
34+ },
35+ "files" : [
36+ " src/filters.php"
37+ ]
3538 },
3639 "autoload-dev" : {
3740 "psr-4" : {
Original file line number Diff line number Diff line change @@ -14,10 +14,6 @@ class ChunkStream extends FilteredStream
1414 */
1515 public function getReadFilter ()
1616 {
17- if (!array_key_exists ('chunk ' , stream_get_filters ())) {
18- stream_filter_register ('chunk ' , 'Http\Message\Encoding\Filter\Chunk ' );
19- }
20-
2117 return 'chunk ' ;
2218 }
2319
Original file line number Diff line number Diff line change @@ -24,10 +24,6 @@ public function getReadFilter()
2424 */
2525 public function getWriteFilter ()
2626 {
27- if (!array_key_exists ('chunk ' , stream_get_filters ())) {
28- stream_filter_register ('chunk ' , 'Http\Message\Encoding\Filter\Chunk ' );
29- }
30-
3127 return 'chunk ' ;
3228 }
3329}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ // Register chunk filter if not found
4+ if (!array_key_exists ('chunk ' , stream_get_filters ())) {
5+ stream_filter_register ('chunk ' , 'Http\Message\Encoding\Filter\Chunk ' );
6+ }
You can’t perform that action at this time.
0 commit comments