diff --git a/README.md b/README.md index dce4b60..fd860cf 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,13 @@ read-only streams and the readable side of duplex streams. Besides defining a few methods, this interface also implements the `EventEmitterInterface` which allows you to react to certain events. +The event callback functions MUST be a valid `callable` that obeys strict +parameter definitions and MUST accept event parameters exactly as documented. +The event callback functions MUST NOT throw an `Exception`. +The return value of the event callback functions will be ignored and has no +effect, so for performance reasons you're recommended to not return any +excessive data structures. + Every implementation of this interface MUST follow these event semantics in order to be considered a well-behaving stream. @@ -392,6 +399,13 @@ write-only streams and the writable side of duplex streams. Besides defining a few methods, this interface also implements the `EventEmitterInterface` which allows you to react to certain events. +The event callback functions MUST be a valid `callable` that obeys strict +parameter definitions and MUST accept event parameters exactly as documented. +The event callback functions MUST NOT throw an `Exception`. +The return value of the event callback functions will be ignored and has no +effect, so for performance reasons you're recommended to not return any +excessive data structures. + Every implementation of this interface MUST follow these event semantics in order to be considered a well-behaving stream. @@ -721,6 +735,13 @@ Besides defining a few methods, this interface also implements the `EventEmitterInterface` which allows you to react to the same events defined on the `ReadbleStreamInterface` and `WritableStreamInterface`. +The event callback functions MUST be a valid `callable` that obeys strict +parameter definitions and MUST accept event parameters exactly as documented. +The event callback functions MUST NOT throw an `Exception`. +The return value of the event callback functions will be ignored and has no +effect, so for performance reasons you're recommended to not return any +excessive data structures. + Every implementation of this interface MUST follow these event semantics in order to be considered a well-behaving stream. diff --git a/src/DuplexStreamInterface.php b/src/DuplexStreamInterface.php index cd58b57..631ce31 100644 --- a/src/DuplexStreamInterface.php +++ b/src/DuplexStreamInterface.php @@ -15,6 +15,13 @@ * `EventEmitterInterface` which allows you to react to the same events defined * on the `ReadbleStreamInterface` and `WritableStreamInterface`. * + * The event callback functions MUST be a valid `callable` that obeys strict + * parameter definitions and MUST accept event parameters exactly as documented. + * The event callback functions MUST NOT throw an `Exception`. + * The return value of the event callback functions will be ignored and has no + * effect, so for performance reasons you're recommended to not return any + * excessive data structures. + * * Every implementation of this interface MUST follow these event semantics in * order to be considered a well-behaving stream. * diff --git a/src/ReadableStreamInterface.php b/src/ReadableStreamInterface.php index 0ad9e65..2b4c3d0 100644 --- a/src/ReadableStreamInterface.php +++ b/src/ReadableStreamInterface.php @@ -144,6 +144,13 @@ * non-writable AND non-readable mode, see also `isWritable()`. * Note that this event should not be confused with the `end` event. * + * The event callback functions MUST be a valid `callable` that obeys strict + * parameter definitions and MUST accept event parameters exactly as documented. + * The event callback functions MUST NOT throw an `Exception`. + * The return value of the event callback functions will be ignored and has no + * effect, so for performance reasons you're recommended to not return any + * excessive data structures. + * * Every implementation of this interface MUST follow these event semantics in * order to be considered a well-behaving stream. * diff --git a/src/WritableStreamInterface.php b/src/WritableStreamInterface.php index 6b8b90d..3bc932e 100644 --- a/src/WritableStreamInterface.php +++ b/src/WritableStreamInterface.php @@ -120,6 +120,13 @@ * non-writable AND non-readable mode, see also `isReadable()`. * Note that this event should not be confused with the `end` event. * + * The event callback functions MUST be a valid `callable` that obeys strict + * parameter definitions and MUST accept event parameters exactly as documented. + * The event callback functions MUST NOT throw an `Exception`. + * The return value of the event callback functions will be ignored and has no + * effect, so for performance reasons you're recommended to not return any + * excessive data structures. + * * Every implementation of this interface MUST follow these event semantics in * order to be considered a well-behaving stream. *