@@ -33,7 +33,7 @@ public function stop();
33
33
* @param callable(string $watcherId, mixed $data) $callback The callback to defer. The $watcherId will be invalidated before the callback call.
34
34
* @param mixed $data Arbitrary data given to the callback function as the $data parameter.
35
35
*
36
- * @return string An identifier that can be used to cancel, enable or disable the watcher.
36
+ * @return string An unique identifier that can be used to cancel, enable or disable the watcher.
37
37
*/
38
38
public function defer (callable $ callback , $ data = null );
39
39
@@ -46,7 +46,7 @@ public function defer(callable $callback, $data = null);
46
46
* @param callable(string $watcherId, mixed $data) $callback The callback to delay. The $watcherId will be invalidated before the callback call.
47
47
* @param mixed $data Arbitrary data given to the callback function as the $data parameter.
48
48
*
49
- * @return string An identifier that can be used to cancel, enable or disable the watcher.
49
+ * @return string An unique identifier that can be used to cancel, enable or disable the watcher.
50
50
*/
51
51
public function delay ($ delay , callable $ callback , $ data = null );
52
52
@@ -60,7 +60,7 @@ public function delay($delay, callable $callback, $data = null);
60
60
* @param callable(string $watcherId, mixed $data) $callback The callback to repeat.
61
61
* @param mixed $data Arbitrary data given to the callback function as the $data parameter.
62
62
*
63
- * @return string An identifier that can be used to cancel, enable or disable the watcher.
63
+ * @return string An unique identifier that can be used to cancel, enable or disable the watcher.
64
64
*/
65
65
public function repeat ($ interval , callable $ callback , $ data = null );
66
66
@@ -71,7 +71,7 @@ public function repeat($interval, callable $callback, $data = null);
71
71
* @param callable(string $watcherId, resource $stream, mixed $data) $callback The callback to execute.
72
72
* @param mixed $data Arbitrary data given to the callback function as the $data parameter.
73
73
*
74
- * @return string An identifier that can be used to cancel, enable or disable the watcher.
74
+ * @return string An unique identifier that can be used to cancel, enable or disable the watcher.
75
75
*/
76
76
public function onReadable ($ stream , callable $ callback , $ data = null );
77
77
@@ -82,7 +82,7 @@ public function onReadable($stream, callable $callback, $data = null);
82
82
* @param callable(string $watcherId, resource $stream, mixed $data) $callback The callback to execute.
83
83
* @param mixed $data Arbitrary data given to the callback function as the $data parameter.
84
84
*
85
- * @return string An identifier that can be used to cancel, enable or disable the watcher.
85
+ * @return string An unique identifier that can be used to cancel, enable or disable the watcher.
86
86
*/
87
87
public function onWritable ($ stream , callable $ callback , $ data = null );
88
88
@@ -93,7 +93,7 @@ public function onWritable($stream, callable $callback, $data = null);
93
93
* @param callable(string $watcherId, int $signo, mixed $data) $callback The callback to execute.
94
94
* @param mixed $data Arbitrary data given to the callback function as the $data parameter.
95
95
*
96
- * @return string An identifier that can be used to cancel, enable or disable the watcher.
96
+ * @return string An unique identifier that can be used to cancel, enable or disable the watcher.
97
97
*
98
98
* @throws UnsupportedFeatureException Thrown if signal handling is not supported.
99
99
*/
@@ -105,6 +105,8 @@ public function onSignal($signo, callable $callback, $data = null);
105
105
* @param string $watcherId The watcher identifier.
106
106
*
107
107
* @return void
108
+ *
109
+ * @throws InvalidWatcherException Thrown if the watcher identifier is invalid.
108
110
*/
109
111
public function enable ($ watcherId );
110
112
@@ -114,11 +116,13 @@ public function enable($watcherId);
114
116
* @param string $watcherId The watcher identifier.
115
117
*
116
118
* @return void
119
+ *
120
+ * @throws InvalidWatcherException Thrown if the watcher identifier is invalid.
117
121
*/
118
122
public function disable ($ watcherId );
119
123
120
124
/**
121
- * Cancel a watcher.
125
+ * Cancel a watcher. This marks the watcher as invalid. Calling this function MUST never fail, even when passed an invalid watcher.
122
126
*
123
127
* @param string $watcherId The watcher identifier.
124
128
*
@@ -135,6 +139,8 @@ public function cancel($watcherId);
135
139
* @param string $watcherId The watcher identifier.
136
140
*
137
141
* @return void
142
+ *
143
+ * @throws InvalidWatcherException Thrown if the watcher identifier is invalid.
138
144
*/
139
145
public function reference ($ watcherId );
140
146
@@ -147,6 +153,8 @@ public function reference($watcherId);
147
153
* @param string $watcherId The watcher identifier.
148
154
*
149
155
* @return void
156
+ *
157
+ * @throws InvalidWatcherException Thrown if the watcher identifier is invalid.
150
158
*/
151
159
public function unreference ($ watcherId );
152
160
0 commit comments