1 | <?php |
||
6 | class JobsResponse extends BaseResponse implements ResponseInterface |
||
7 | { |
||
8 | use ArrayChecker; |
||
9 | |||
10 | const KEY_ID = 'id'; |
||
11 | const KEY_BODY = 'body'; |
||
12 | |||
13 | /** |
||
14 | * The position where a node prefix starts in the job ID |
||
15 | */ |
||
16 | const ID_NODE_PREFIX_START = 2; |
||
17 | |||
18 | /** |
||
19 | * Job details for each job |
||
20 | * |
||
21 | * The values in this array must follow these rules: |
||
22 | * - The number of the values must be the same as the number of rows |
||
23 | * returned from the respective Disque command |
||
24 | * - The order of the values must follow the rows returned by Disque |
||
25 | * |
||
26 | * The values in $jobDetails will be used as keys in the final response |
||
27 | * the command returns. |
||
28 | * |
||
29 | * @see self::parse() |
||
30 | * |
||
31 | * @var array |
||
32 | */ |
||
33 | protected $jobDetails = []; |
||
34 | |||
35 | public function __construct() |
||
39 | |||
40 | /** |
||
41 | * @inheritdoc |
||
42 | */ |
||
43 | public function setBody($body) |
||
67 | |||
68 | /** |
||
69 | * @inheritdoc |
||
70 | */ |
||
71 | public function parse() |
||
85 | } |
||
86 |