Stream filter support

Programming / Compilers / HHVM - Fred Emmott [fb.com] - 7 March 2014 12:09 EST

Fixes #1241 refs guzzle/guzzle#538

Reviewed By: @ptarjan

Differential Revision: D1192200

8290a10 Stream filter support
hphp/runtime/base/file.cpp | 146 ++++-
hphp/runtime/base/file.h | 52 ++
hphp/runtime/base/http-stream-wrapper.cpp | 2 +-
hphp/runtime/base/mem-file.cpp | 5 +-
hphp/runtime/base/output-file.cpp | 1 +
hphp/runtime/base/pipe.cpp | 1 +
hphp/runtime/base/plain-file.cpp | 5 +-
hphp/runtime/base/socket.cpp | 1 +
hphp/runtime/base/ssl-socket.cpp | 1 +
hphp/runtime/base/temp-file.cpp | 1 +
hphp/runtime/ext/bz2/bz2-file.cpp | 1 +
hphp/runtime/ext/ext.h | 2 +-
hphp/runtime/ext/ext_file.cpp | 2 +-
hphp/runtime/ext/ext_network.h | 2 +-
hphp/runtime/ext/ext_pdo.cpp | 2 +-
hphp/runtime/ext/ext_soap.cpp | 2 +-
hphp/runtime/ext/ext_sqlite3.cpp | 2 +-
hphp/runtime/ext/ext_stream.cpp | 671 -------------------
hphp/runtime/ext/ext_stream.h | 168 -----
hphp/runtime/ext/mailparse/mime.cpp | 2 +-
hphp/runtime/ext/pdo_mysql.cpp | 2 +-
hphp/runtime/ext/pdo_sqlite.cpp | 2 +-
hphp/runtime/ext/soap/xml.cpp | 2 +-
.../runtime/ext/stream/ext_stream-user-filters.cpp | 304 +++++++++
hphp/runtime/ext/stream/ext_stream-user-filters.h | 90 +++
.../runtime/ext/stream/ext_stream-user-filters.php | 41 ++
hphp/runtime/ext/stream/ext_stream.cpp | 690 ++++++++++++++++++++
hphp/runtime/ext/stream/ext_stream.h | 146 +++++
hphp/runtime/ext/zlib/zip-file.cpp | 1 +
hphp/system/php.txt | 1 +
hphp/system/php/stream/user-filters.php | 63 ++
hphp/test/slow/streams/buffered_user_filters.php | 36 +
.../slow/streams/buffered_user_filters.php.expect | 1 +
hphp/test/slow/streams/unbuffered_user_filter.php | 57 ++
.../slow/streams/unbuffered_user_filter.php.expect | 8 +
.../slow/streams/user_filter_bad_return_type.php | 58 ++
.../streams/user_filter_bad_return_type.php.expect | 8 +
hphp/test/slow/streams/user_filter_oncreate.php | 45 ++
.../slow/streams/user_filter_oncreate.php.expectf | 28 +
hphp/test/slow/streams/user_filter_order.php | 39 ++
.../test/slow/streams/user_filter_order.php.expect | 2 +
41 files changed, 1831 insertions(+), 862 deletions(-)

Upstream: github.com


  • Share