Côme Chilliet
e87431bc4c
Fix return type of wrap method to resource|false instead of resource|bool
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-03-14 10:22:49 +01:00
32b65b0bad
type fixes
2021-03-02 19:34:10 +01:00
fdc0e3f113
formatting
2021-03-02 19:34:10 +01:00
782e09ec62
some extra type checks
2019-03-11 17:23:14 +01:00
2c8ae56d02
cleanup context handling for wrappers
2019-03-11 16:52:13 +01:00
3171a535de
autodetect class and protocol
2019-03-11 15:36:15 +01:00
Roeland Jago Douma
8c45c9a43b
Pass the strlen to the readCallback as was expected
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-02-15 13:52:13 +01:00
Roeland Jago Douma
3c98a7556b
Add a preClose callback
...
This is useful in case a callback wants to do something with the stream
right before it gets closed.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-02-14 16:30:54 +01:00
Roeland Jago Douma
0bc7fe4cb1
Fix read in callbackwrapper
...
The number of read bytes is not the same as the number of bytes
requested to read.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-02-14 15:28:47 +01:00
Vincent Petry
668abfee80
Prevent duplicate closeCallback calls in case of GC ghosts
...
Sometimes PHP 7 GC decides to call stream_close again even after the
PHP request has ended, and even if fclose was called before already.
2016-12-02 14:57:57 +01:00
Robin Appelman
b9bba79250
Check if callable when we actually try to call it
2014-08-27 15:52:10 +02:00
Robin Appelman
53cfe7f4f1
Add directory support to wrappers
2014-08-27 15:42:40 +02:00
Robin Appelman
a96e4754f7
No need to check if isset since we're creating the context ourselves
2014-08-27 12:20:26 +02:00
Robin Appelman
99ecfc5287
Better cleanup of registered streams
2014-07-31 01:06:38 +02:00
Robin Appelman
b876cef7f2
Add interfaces for File and Directory wrappers
2014-07-30 23:51:55 +02:00
Robin Appelman
fd996aea9c
Fix case
2014-07-24 01:44:48 +02:00
Robin Appelman
a19beaf7ef
Add Wrapper::wrap() convenience method
...
also fix some test class names
2014-07-24 01:07:35 +02:00
Robin Appelman
acb8b69108
call callbacks after running the stream operation
2014-07-24 00:45:45 +02:00
Robin Appelman
d54615fd3a
initial version
2014-07-23 23:02:10 +02:00