diff options
| author | Dmitry Stogov <dmitry@php.net> | 2007-07-03 10:22:55 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2007-07-03 10:22:55 +0000 |
| commit | f766275b7a1485ad8ce327dbe51badc4157a3620 (patch) | |
| tree | 81ed5033f154aefd876c8a957578ce3158044822 /ext/standard/basic_functions.c | |
| parent | 070632248fdae2ecd7f728da3ef47313a7081b73 (diff) | |
| download | php-git-f766275b7a1485ad8ce327dbe51badc4157a3620.tar.gz | |
Added ability to create local or remote (URL) user streams
Local user streams must not be able to open(), URLs if allow_url_include is off
Implemented new function stream_is_local()
[
- stream_wrapper_register() extended with additional optional argument "flags"
of type long. This time only one flag is implemented - STREAM_IS_URL, that
means that userstream wrapper is remote (URL). By default stream is local.
- stream_is_local() is a new function that accepts stream and tell if this
stream is local or remote (URL)
]
Diffstat (limited to 'ext/standard/basic_functions.c')
| -rw-r--r-- | ext/standard/basic_functions.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 0f594d4927..cbd989ea13 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -205,9 +205,10 @@ ZEND_END_ARG_INFO() /* }}} */ /* {{{ main/streams/userspace.c */ static -ZEND_BEGIN_ARG_INFO(arginfo_stream_wrapper_register, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_wrapper_register, 0, 0, 2) ZEND_ARG_INFO(0, protocol) ZEND_ARG_INFO(0, classname) + ZEND_ARG_INFO(0, flags) ZEND_END_ARG_INFO() static @@ -2347,6 +2348,11 @@ ZEND_BEGIN_ARG_INFO(arginfo_stream_get_wrappers, 0) ZEND_END_ARG_INFO() static +ZEND_BEGIN_ARG_INFO(arginfo_stream_is_local, 0) + ZEND_ARG_INFO(0, stream) +ZEND_END_ARG_INFO() + +static ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_select, 0, 0, 4) ZEND_ARG_INFO(1, read_streams) /* ARRAY_INFO(1, read_streams, 1) */ ZEND_ARG_INFO(1, write_streams) /* ARRAY_INFO(1, write_streams, 1) */ @@ -3596,6 +3602,7 @@ zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(stream_wrapper_restore, arginfo_stream_wrapper_restore) PHP_FE(stream_get_wrappers, arginfo_stream_get_wrappers) PHP_FE(stream_get_transports, arginfo_stream_get_transports) + PHP_FE(stream_is_local, arginfo_stream_is_local) PHP_FE(get_headers, arginfo_get_headers) #if HAVE_SYS_TIME_H || defined(PHP_WIN32) |
