diff --git a/reference/stream/constants.xml b/reference/stream/constants.xml
index 827259f274..06b4f0f099 100644
--- a/reference/stream/constants.xml
+++ b/reference/stream/constants.xml
@@ -1,5 +1,5 @@
-
+
&reftitle.constants;
&extension.constants;
@@ -98,6 +98,94 @@
listening on the socket. Server sockets should always include this flag.
+
+ STREAM_NOTIFY_RESOLVE
+
+ A remote address required for this stream has been resolved, or the resolution
+ failed. See severity for an indication of which happened.
+
+
+
+ STREAM_NOTIFY_CONNECT
+
+ A connection with an external resource has been established.
+
+
+
+ STREAM_NOTIFY_AUTH_REQUIRED
+
+ Additional authorization is required to access the specified resource.
+ Typical issued with severity level of
+ STREAM_NOTIFY_SEVERITY_ERR.
+
+
+
+ STREAM_NOTIFY_MIME_TYPE_IS
+
+ The mime-type of resource has been identified,
+ refer to message for a description of the
+ discovered type.
+
+
+
+ STREAM_NOTIFY_FILE_SIZE_IS
+
+ The size of the resource has been discovered.
+
+
+
+ STREAM_NOTIFY_REDIRECTED
+
+ The external resource has redirected the stream to an alternate
+ location. Refer to message.
+
+
+
+ STREAM_NOTIFY_PROGRESS
+
+ Indicates current progress of the stream transfer in
+ byets_transferred and possibly
+ bytes_max as well.
+
+
+
+ STREAM_NOTIFY_COMPLETED
+
+ There is no more data available on the stream.
+
+
+
+ STREAM_NOTIFY_FAILURE
+
+ A generic error occured on the stream, consult
+ message and message_code
+ for details.
+
+
+
+ STREAM_NOTIFY_AUTH_RESULT
+
+ Authorization has been completed (with or without success).
+
+
+
+ STREAM_NOTIFY_SEVERITY_INFO
+
+ Normal, non-error realted, notification.
+
+
+
+ STREAM_NOTIFY_SEVERITY_WARN
+
+ Non critical error condition. Processing may continue.
+
+
+
+ STREAM_NOTIFY_SEVERITY_ERR
+
+ A critical error occured. Processing cannot continue.
+
+
diff --git a/reference/stream/reference.xml b/reference/stream/reference.xml
index c090f0fc47..68d4fac259 100644
--- a/reference/stream/reference.xml
+++ b/reference/stream/reference.xml
@@ -1,5 +1,5 @@
-
+
Stream functions
Streams
@@ -31,6 +31,10 @@
there is no set limit on what can be done with them. To access the list
of currently registered wrappers, use stream_get_wrappers.
+
+
+
+ Stream Filters
A filter is a final piece of code which may perform
opperations on data as it is being read from or written to a stream.
@@ -66,9 +70,54 @@
-
- &reftitle.required;
- &no.requirement;
+
+ Stream Contexts
+
+ A context is a set of parameters and
+ wrapper specific options which modify or enhance the
+ behavior of a stream. Contexts are created using
+ stream_context_create and can be passed to most
+ filesystem realted stream creation functions (i.e. fopen,
+ file, file_get_contents, etc...).
+
+
+ Options can be specified when calling
+ stream_context_create, or later using
+ stream_context_set_option.
+
+ A list of wrapper specific options can be found with
+ the list of built-in wrappers (See ).
+
+
+ In addition, parameters may be set on a context
+ using stream_context_set_params. Currently the only
+ context parameter supported by PHP is
+ notification. The value of this parameter must be the
+ name of a function to be called when an event occurs on a stream.
+ The notification function called during an event should accept the following
+ six parameters:
+
+
+ voidmy_notifier
+ intnotification_code
+ intseverity
+ stringmessage
+ intmessage_code
+ intbytes_transferred
+ intbytes_max
+
+
+ notification_code and severity
+ are numerical values which correspond to the STREAM_NOTIFY_*
+ constants listed below.
+
+ If a descriptive message is available from the stream, message
+ and message_code will be populated with the appropriate values.
+ The meaning of these values is dependant on the specific wrapper in use.
+
+ bytes_transferred and bytes_max will
+ be populated when applicable.
+
-
- &reftitle.runtime;
- &no.config;
-
-