[IO] Add MemoryHandle
#58
Comments
|
Strong agree. It is something light to swap in during unit tests. |
Thanks; this is reasonable, but definitely something to visit after sockets are done: until then, I want to keep the number of concrete implementations limited to the ones that will shape the overall API design, especially given the huge amount of interfaces, traits, and classes needed to implement it. If socket support reveals shortcomings in the current API design, we'd like to keep the number of things that need updating small. This also means that we're unlikely to accept a pull request until socket support is stable. |
|
MemoryHandle
is a read-write non-disposable handle that stores data in memory ( i.e. propertyprivate string $data = '';
), unlikeTemporaryFile
which stores data in filesystem.MemoryHandle
would be more efficient when dealing with a small amount of data or for mocking HTTP Requests, files ... etc. since it doesn't touch the filesystem.The text was updated successfully, but these errors were encountered: