-
Notifications
You must be signed in to change notification settings - Fork 439
/
Copy pathCommandSubscriberInterface.php
60 lines (58 loc) · 1.52 KB
/
CommandSubscriberInterface.php
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
<?php
namespace Enqueue\Client;
/**
* @phpstan-type CommandConfig = array{
* command: string,
* processor?: string,
* queue?: string,
* prefix_queue?: bool,
* exclusive?: bool,
* }
*/
interface CommandSubscriberInterface
{
/**
* The result maybe either:.
*
* 'aCommandName'
*
* or
*
* [
* 'command' => 'aSubscribedCommand',
* 'processor' => 'aProcessorName',
* 'queue' => 'a_client_queue_name',
* 'prefix_queue' => true,
* 'exclusive' => true,
* ]
*
* or
*
* [
* [
* 'command' => 'aSubscribedCommand',
* 'processor' => 'aProcessorName',
* 'queue' => 'a_client_queue_name',
* 'prefix_queue' => true,
* 'exclusive' => true,
* ],
* [
* 'command' => 'aSubscribedCommand',
* 'processor' => 'aProcessorName',
* 'queue' => 'a_client_queue_name',
* 'prefix_queue' => true,
* 'exclusive' => true,
* ]
* ]
*
* queue, processor, prefix_queue, and exclusive are optional.
* It is possible to pass other options, they could be accessible on a route instance through options.
*
* Note: If you set "prefix_queue" to true then the "queue" is used as is and therefor the driver is not used to create a transport queue name.
*
* @return string|array
*
* @phpstan-return string|CommandConfig|array<CommandConfig>
*/
public static function getSubscribedCommand();
}