mirror of
https://codeberg.org/icewind/streams.git
synced 2026-06-04 00:54:08 +02:00
autodetect class and protocol
This commit is contained in:
parent
2538e6d05c
commit
3171a535de
12 changed files with 28 additions and 15 deletions
|
|
@ -75,10 +75,11 @@ class DirectoryWrapper implements Directory {
|
|||
|
||||
/**
|
||||
* @param array $options the options for the context to wrap the stream with
|
||||
* @param string $class
|
||||
* @param null $class deprecated, class is now automatically generated
|
||||
* @return resource
|
||||
*/
|
||||
protected static function wrapWithOptions($options, $class) {
|
||||
protected static function wrapWithOptions($options, $class = null) {
|
||||
$class = static::class;
|
||||
$context = stream_context_create($options);
|
||||
stream_wrapper_register('dirwrapper', $class);
|
||||
$wrapped = opendir('dirwrapper://', $context);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue