1 | <?php |
||
23 | class UniqueJobIdentifierGenerator |
||
24 | { |
||
25 | /** |
||
26 | * @var string |
||
27 | * |
||
28 | * Generate unique key |
||
29 | */ |
||
30 | protected $generateUniqueKey; |
||
31 | |||
32 | /** |
||
33 | * Construct method |
||
34 | * |
||
35 | * @param string $generateUniqueKey Generate unique key |
||
36 | */ |
||
37 | 5 | public function __construct($generateUniqueKey) |
|
41 | |||
42 | /** |
||
43 | * Generate unique key if generateUniqueKey is enabled |
||
44 | * |
||
45 | * Even some parameters are not used, are passed to allow user overwrite |
||
46 | * method |
||
47 | * |
||
48 | * Also, if name and unique value exceeds 114 bytes, an exception is thrown |
||
49 | * |
||
50 | * @param string $name A GermanBundle registered function to be executed |
||
51 | * @param string $params Parameters to send to task as string |
||
52 | * @param string $unique unique ID used to identify a particular task |
||
53 | * @param string $method Method to perform |
||
54 | * |
||
55 | * @return string Generated Unique Key |
||
56 | * |
||
57 | * @throws WorkerNameTooLongException If name is too large |
||
58 | * |
||
59 | * @api |
||
60 | */ |
||
61 | 2 | public function generateUniqueKey($name, $params, $unique, $method) |
|
74 | } |
||
75 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.