1 | <?php |
||
9 | trait PostponableJobTrait |
||
10 | { |
||
11 | /** |
||
12 | * @inheritdoc |
||
13 | */ |
||
14 | 10 | public function postponeUntil($spec, $releaseDelay = null) |
|
44 | |||
45 | /** |
||
46 | * @param int $jobId An id of a job |
||
47 | * @return int the number of the id's added |
||
48 | */ |
||
49 | 9 | private function addPostponeUntil($jobId) |
|
60 | |||
61 | /** |
||
62 | * Set metadata |
||
63 | * |
||
64 | * @param string|int|array|\Traversable $spec |
||
65 | * @param mixed $value |
||
66 | */ |
||
67 | abstract function setMetadata($spec, $value = null); |
||
68 | |||
69 | /** |
||
70 | * Get metadata |
||
71 | * |
||
72 | * @param null|string|int $key |
||
73 | * @return mixed |
||
74 | */ |
||
75 | abstract function getMetadata($key = null, $default = null); |
||
76 | } |
||
77 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.