File: gearman.stub.php

package info (click to toggle)
php-gearman 2.1.0%2B1.1.2-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,000 kB
  • sloc: ansic: 6,240; php: 1,022; xml: 668; sh: 32; makefile: 2
file content (388 lines) | stat: -rw-r--r-- 18,166 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
<?php
/** @generate-function-entries */

function gearman_version(): string {}
function gearman_bugreport(): string {}
function gearman_verbose_name(int $verbose): ?string {}

function gearman_client_create(): GearmanClient|false {}
function gearman_worker_create(): GearmanWorker|false {}

class GearmanClient {

    public function __construct() {}
    public function __destruct() {}

    /** @alias gearman_client_return_code */
    public function returnCode(): int {}

    /** @alias gearman_client_error */
    public function error(): string|false {}

    /** @alias gearman_client_get_errno */
    public function getErrno(): int {}

    /** @alias gearman_client_options */
    public function options(): int {}

    /** @alias gearman_client_set_options */
    public function setOptions(int $option): bool {}

    /** @alias gearman_client_add_options */
    public function addOptions(int $option): bool {}

    /** @alias gearman_client_remove_options */
    public function removeOptions(int $option): bool {}

    /** @alias gearman_client_timeout */
    public function timeout(): int {}

    /** @alias gearman_client_set_timeout */
    public function setTimeout(int $timeout): bool {}

    /** @alias gearman_client_add_server */
    public function addServer(string $host = null, int $port = 0, bool $setupExceptionHandler = true): bool {}

    /** @alias gearman_client_add_servers */
    public function addServers(string $servers = null, bool $setupExceptionHandler = true): bool {}

    /** @alias gearman_client_wait */
    public function wait(): bool {}

    /** @alias gearman_client_do_normal */
    public function doNormal(string $function, string $workload, ?string $unique = null): string {}

    /** @alias gearman_client_do_high */
    public function doHigh(string $function, string $workload, ?string $unique = null): string {}

    /** @alias gearman_client_do_low */
    public function dolow(string $function, string $workload, ?string $unique = null): string {}

    /** @alias gearman_client_do_background */
    public function doBackground(string $function, string $workload, ?string $unique = null): string {}

    /** @alias gearman_client_do_high_background */
    public function doHighBackground(string $function, string $workload, ?string $unique = null): string {}

    /** @alias gearman_client_do_low_background */
    public function doLowBackground(string $function, string $workload, ?string $unique = null): string {}

    /** @alias gearman_client_do_job_handle */
    public function doJobHandle(): string {}

    /** @alias gearman_client_do_status */
    public function doStatus(): array {}

    /** @alias gearman_client_job_status */
    public function jobStatus(string $job_handle): array {}

    /** @alias gearman_client_job_status_by_unique_key */
    public function jobStatusByUniqueKey(string $unique_key): array {}

    /** @alias gearman_client_ping */
    public function ping(string $workload): bool {}

    /** @alias gearman_client_add_task */
    public function addTask(string $function_name, string|int|float $workload, ?mixed $context = null, ?string $unique_key = null): GearmanTask|false {}

    /** @alias gearman_client_add_task_high */
    public function addTaskHigh(string $function_name, string|int|float $workload, ?mixed $context = null, ?string $unique_key = null): GearmanTask|false {}

    /** @alias gearman_client_add_task_low */
    public function addTaskLow(string $function_name, string|int|float $workload, ?mixed $context = null, ?string $unique_key = null): GearmanTask|false {}

    /** @alias gearman_client_add_task_background */
    public function addTaskBackground(string $function_name, string|int|float $workload, ?mixed $context = null, ?string $unique_key = null): GearmanTask|false {}

    /** @alias gearman_client_add_task_high_background */
    public function addTaskHighBackground(string $function_name, string|int|float $workload, ?mixed $context = null, ?string $unique_key = null): GearmanTask|false {}

    /** @alias gearman_client_add_task_low_background */
    public function addTaskLowBackground(string $function_name, string|int|float $workload, ?mixed $context = null, ?string $unique_key = null): GearmanTask|false {}

    /** @alias gearman_client_run_tasks */
    public function runTasks(): bool {}

    /** @alias gearman_client_add_task_status */
    public function addTaskStatus (string $job_handle, ?mixed $context = null): GearmanTask {}

    /** @alias gearman_client_set_workload_callback */
    public function setWorkloadCallback(callable $function): bool {}

    /** @alias gearman_client_set_created_callback */
    public function setCreatedCallback(callable $function): bool {}

    /** @alias gearman_client_set_data_callback */
    public function setDataCallback(callable $function): bool {}

    /** @alias gearman_client_set_warning_callback */
    public function setWarningCallback(callable $function): bool {}

    /** @alias gearman_client_set_status_callback */
    public function setStatusCallback(callable $function): bool {}

    /** @alias gearman_client_set_complete_callback */
    public function setCompleteCallback(callable $function): bool {}

    /** @alias gearman_client_set_exception_callback */
    public function setExceptionCallback(callable $function): bool {}

    /** @alias gearman_client_set_fail_callback */
    public function setFailCallback(callable $function): bool {}

    /** @alias gearman_client_clear_callbacks */
    public function clearCallbacks(): bool {}

    /** @alias gearman_client_context */
    public function context(): string {}

    /** @alias gearman_client_set_context */
    public function setContext(string $data): bool {}

    /** @alias gearman_client_enable_exception_handler */
    public function enableExceptionHandler(): bool {}

}

function gearman_client_return_code(GearmanClient $obj): ?int {}
function gearman_client_error(GearmanClient $obj): null|string|false {}
function gearman_client_get_errno(GearmanClient $obj): ?int {}
function gearman_client_options(GearmanClient $obj): ?int {}
function gearman_client_set_options(GearmanClient $obj, int $option): bool {}
function gearman_client_add_options(GearmanClient $obj, int $option): bool {}
function gearman_client_remove_options(GearmanClient $obj, int $option): bool {}
function gearman_client_timeout(GearmanClient $obj): ?int {}
function gearman_client_set_timeout(GearmanClient $obj, int $timeout): bool {}
function gearman_client_add_server(GearmanClient $obj, string $host = null, int $port = 0, bool $setupExceptionHandler = true): bool {}
function gearman_client_add_servers(GearmanClient $obj, string $servers = null, bool $setupExceptionHandler = true): bool {}
function gearman_client_wait(GearmanClient $obj): bool {}
function gearman_client_do_normal(GearmanClient $obj, string $function, string $workload, ?string $unique = null): string {}
function gearman_client_do_high(GearmanClient $obj, string $function, string $workload, ?string $unique = null): string {}
function gearman_client_do_low(GearmanClient $obj, string $function, string $workload, ?string $unique = null): string {}
function gearman_client_do_background(GearmanClient $obj, string $function, string $workload, ?string $unique = null): string {}
function gearman_client_do_high_background(GearmanClient $obj, string $function, string $workload, ?string $unique = null): string {}
function gearman_client_do_low_background(GearmanClient $obj, string $function, string $workload, ?string $unique = null): string {}
function gearman_client_do_job_handle(GearmanClient $obj): string {}
function gearman_client_do_status(GearmanClient $obj): array {}
function gearman_client_job_status(GearmanClient $obj, string $job_handle): array {}
function gearman_client_job_status_by_unique_key(GearmanClient $obj, string $unique_key): array {}
function gearman_client_ping(GearmanClient $obj, string $workload): bool {}
function gearman_client_add_task(GearmanClient $obj, string $function_name, string|int|float $workload, ?mixed $context = null, ?string $unique_key = null): GearmanTask|false {}
function gearman_client_add_task_high(GearmanClient $obj, string $function_name, string|int|float $workload, ?mixed $context = null, ?string $unique_key = null): GearmanTask|false {}
function gearman_client_add_task_low(GearmanClient $obj, string $function_name, string|int|float $workload, ?mixed $context = null, ?string $unique_key = null): GearmanTask|false {}
function gearman_client_add_task_background(GearmanClient $obj, string $function_name, string|int|float $workload, ?mixed $context = null, ?string $unique_key = null): GearmanTask|false {}
function gearman_client_add_task_high_background(GearmanClient $obj, string $function_name, string|int|float $workload, ?mixed $context = null, ?string $unique_key = null): GearmanTask|false {}
function gearman_client_add_task_low_background(GearmanClient $obj, string $function_name, string|int|float $workload, ?mixed $context = null, ?string $unique_key = null): GearmanTask|false {}
function gearman_client_run_tasks(GearmanClient $obj): bool {}
function gearman_client_add_task_status(GearmanClient $obj, string $job_handle, ?mixed $context = null): GearmanTask {}
function gearman_client_set_workload_callback(GearmanClient $obj, callable $function): bool {}
function gearman_client_set_created_callback(GearmanClient $obj, callable $function): bool {}
function gearman_client_set_data_callback(GearmanClient $obj, callable $function): bool {}
function gearman_client_set_warning_callback(GearmanClient $obj, callable $function): bool {}
function gearman_client_set_status_callback(GearmanClient $obj, callable $function): bool {}
function gearman_client_set_complete_callback(GearmanClient $obj, callable $function): bool {}
function gearman_client_set_exception_callback(GearmanClient $obj, callable $function): bool {}
function gearman_client_set_fail_callback(GearmanClient $obj, callable $function): bool {}
function gearman_client_clear_callbacks(GearmanClient $obj): bool {}
function gearman_client_context(GearmanClient $obj): string {}
function gearman_client_set_context(GearmanClient $obj, string $data): bool {}
function gearman_client_enable_exception_handler(GearmanClient $obj): bool {}

class GearmanJob {
    public function __destruct() {}

    /** @alias gearman_job_return_code */
    public function returnCode(): ?int {}

    /** @alias gearman_job_set_return */
    public function setReturn(int $gearman_return_t): ?bool {}

    /** @alias gearman_job_send_data */
    public function sendData(string $data): ?bool {}

    /** @alias gearman_job_send_warning */
    public function sendWarning(string $warning): bool {}

    /** @alias gearman_job_send_status */
    public function sendStatus(int $numerator, int $denominator): bool {}

    /** @alias gearman_job_send_complete */
    public function sendComplete(string $result): bool {}

    /** @alias gearman_job_send_exception */
    public function sendException(string $exception): bool {}

    /** @alias gearman_job_send_fail */
    public function sendFail(): bool {}

    /** @alias gearman_job_handle */
    public function handle(): bool|string {}

    /** @alias gearman_job_function_name */
    public function functionName(): bool|string {}

    /** @alias gearman_job_unique */
    public function unique(): bool|string {}

    /** @alias gearman_job_workload */
    public function workload(): string {}

    /** @alias gearman_job_workload_size */
    public function workloadSize(): ?int {}
}

function gearman_job_return_code(GearmanJob $obj): ?int {}
function gearman_job_set_return(GearmanJob $obj, int $gearman_return_t): ?bool {}
function gearman_job_send_data(GearmanJob $obj, string $data): ?bool {}
function gearman_job_send_warning(GearmanJob $obj, string $warning): bool {}
function gearman_job_send_status(GearmanJob $obj, int $numerator, int $denominator): bool {}
function gearman_job_send_complete(GearmanJob $obj, string $result): bool {}
function gearman_job_send_exception(GearmanJob $obj, string $exception): bool {}
function gearman_job_send_fail(GearmanJob $obj): bool {}
function gearman_job_handle(GearmanJob $obj): bool|string {}
function gearman_job_function_name(GearmanJob $obj): bool|string {}
function gearman_job_unique(GearmanJob $obj): bool|string {}
function gearman_job_workload(GearmanJob $obj): string {}
function gearman_job_workload_size(GearmanJob $obj): ?int {}

class GearmanTask {

    public function __construct() {}

    /** @alias gearman_task_return_code */
    public function returnCode(): int {}

    /** @alias gearman_task_function_name */
    public function functionName(): bool|string {}

    /** @alias gearman_task_unique */
    public function unique(): bool|string {}

    /** @alias gearman_task_job_handle */
    public function jobHandle(): bool|string {}

    /** @alias gearman_task_is_known */
    public function isKnown(): bool {}

    /** @alias gearman_task_is_running */
    public function isRunning(): bool {}

    /** @alias gearman_task_numerator */
    public function taskNumerator(): bool|int {}

    /** @alias gearman_task_denominator */
    public function taskDenominator(): bool|int {}

    /** @alias gearman_task_data */
    public function data(): bool|string {}

    /** @alias gearman_task_data_size */
    public function dataSize(): int|false {}

    /** @alias gearman_task_send_workload */
    public function sendWorkload(string $data): int|false {}

    /** @alias gearman_task_recv_data */
    public function recvData(int $data_len): bool|array {}
}

function gearman_task_return_code(GearmanTask $obj): ?int {}
function gearman_task_function_name(GearmanTask $obj): null|bool|string {}
function gearman_task_unique(GearmanTask $obj): null|bool|string {}
function gearman_task_job_handle(GearmanTask $obj): null|bool|string {}
function gearman_task_is_known(GearmanTask $obj): ?bool {}
function gearman_task_is_running(GearmanTask $obj): ?bool {}
function gearman_task_numerator(GearmanTask $obj): null|bool|int {}
function gearman_task_denominator(GearmanTask $obj): null|bool|int {}
function gearman_task_data(GearmanTask $obj): null|bool|string {}
function gearman_task_data_size(GearmanTask $obj): int|false {}
function gearman_task_send_workload(GearmanTask $obj, string $data): int|false {}
function gearman_task_recv_data(GearmanTask $obj, int $data_len): bool|array {}

class GearmanWorker {
    public function __construct() {}
    public function __destruct() {}

    /** @alias gearman_worker_return_code */
    public function returnCode(): ?int {}

    /** @alias gearman_worker_error */
    public function error(): string|false {}

    /** @alias gearman_worker_errno */
    public function getErrno(): int|false {}

    /** @alias gearman_worker_options */
    public function options(): ?int {}

    /** @alias gearman_worker_set_options */
    public function setOptions(int $option): ?bool {}

    /** @alias gearman_worker_add_options */
    public function addOptions(int $option): ?bool {}

    /** @alias gearman_worker_remove_options */
    public function removeOptions(int $option): ?bool {}

    /** @alias gearman_worker_timeout */
    public function timeout(): ?int {}

    /** @alias gearman_worker_set_timeout */
    public function setTimeout(int $timeout): bool {}

    /** @alias gearman_worker_set_id */
    public function setId(string $id): bool {}

    /** @alias gearman_worker_add_server */
    public function addServer(string $host = null, int $port = 0): bool {}

    /** @alias gearman_worker_add_servers */
    public function addServers(string $servers = null): bool {}

    /** @alias gearman_worker_wait */
    public function wait(): bool {}

    /** @alias gearman_worker_register */
    public function register(string $function_name, int $timeout = 0): bool {}

    /** @alias gearman_worker_unregister */
    public function unregister(string $function_name): bool {}

    /** @alias gearman_worker_unregister_all */
    public function unregisterAll(): bool {}

    /** @alias gearman_worker_grab_job */
    public function grabJob(): GearmanWorker|false {}

    /** @alias gearman_worker_add_function */
    public function addFunction(string $function_name, callable $function, ?mixed $context = null, int $timeout = 0): bool {}

    /** @alias gearman_worker_work */
    public function work(): bool {}

    /** @alias gearman_worker_ping */
    public function ping(string $data): bool {}
}

function gearman_worker_return_code(GearmanWorker $obj): ?int {}
function gearman_worker_error(GearmanWorker $obj): string|false {}
function gearman_worker_errno(GearmanWorker $obj): int|false {}
function gearman_worker_options(GearmanWorker $obj): ?int {}
function gearman_worker_set_options(GearmanWorker $obj, int $option): ?bool {}
function gearman_worker_add_options(GearmanWorker $obj, int $option): ?bool {}
function gearman_worker_remove_options(GearmanWorker $obj, int $option): ?bool {}
function gearman_worker_timeout(GearmanWorker $obj): ?int {}
function gearman_worker_set_timeout(GearmanWorker $obj, int $timeout): bool {}
function gearman_worker_set_id(GearmanWorker $obj, string $id): bool {}
function gearman_worker_add_server(GearmanWorker $obj, string $host = null, int $port = 0): bool {}
function gearman_worker_add_servers(GearmanWorker $obj, string $servers = null): bool {}
function gearman_worker_wait(GearmanWorker $obj): bool {}
function gearman_worker_register(GearmanWorker $obj, string $function_name, int $timeout = 0): bool {}
function gearman_worker_unregister(GearmanWorker $obj, string $function_name): bool {}
function gearman_worker_unregister_all(GearmanWorker $obj): bool {}
function gearman_worker_grab_job(GearmanWorker $obj): GearmanWorker|false {}
function gearman_worker_add_function(GearmanWorker $obj, string $function_name, callable $function, ?mixed $context = null, int $timeout = 0): bool {}
function gearman_worker_work(GearmanWorker $obj): bool {}
function gearman_worker_ping(GearmanWorker $obj, string $data): bool {}

class GearmanException extends Exception { }