1 | <?php |
||
4 | class Client |
||
5 | { |
||
6 | /** |
||
7 | * @var \GearmanClient |
||
8 | */ |
||
9 | private $realClient; |
||
10 | /** |
||
11 | * @var ServerCollection |
||
12 | */ |
||
13 | private $serverCollection; |
||
14 | |||
15 | /** |
||
16 | * @var bool |
||
17 | */ |
||
18 | private $serverAddedToClient = false; |
||
19 | |||
20 | const PRIORITY_LOW = 0; |
||
21 | const PRIORITY_NORMAL = 1; |
||
22 | const PRIORITY_HIGH = 2; |
||
23 | |||
24 | /** |
||
25 | * @param ServerCollection $servers |
||
26 | */ |
||
27 | 10 | public function __construct(ServerCollection $servers) |
|
31 | |||
32 | /** |
||
33 | * @param \GearmanClient $client |
||
34 | */ |
||
35 | 9 | public function setImplementation(\GearmanClient $client) |
|
39 | |||
40 | 1 | public function getJobStatus($jobHandle) |
|
46 | |||
47 | /** |
||
48 | * @param $method |
||
49 | * @param $workLoad |
||
50 | * @param int $priority |
||
51 | * @return mixed |
||
52 | */ |
||
53 | 3 | public function executeInBackground($method, $workLoad, $priority = self::PRIORITY_LOW) |
|
74 | |||
75 | |||
76 | /** |
||
77 | * @param $method |
||
78 | * @param $workLoad |
||
79 | * @param int $priority |
||
80 | * @return string |
||
81 | */ |
||
82 | 4 | public function executeJob($method, $workLoad, $priority = self::PRIORITY_LOW) |
|
106 | |||
107 | /** |
||
108 | * @param array $jobs Array of dmank\gearman\Job, jobs to do |
||
109 | * @param int $priority |
||
110 | * @return array |
||
111 | */ |
||
112 | 1 | public function executeJobs(array $jobs, $priority = self::PRIORITY_LOW) |
|
133 | |||
134 | /** |
||
135 | * @return \GearmanClient |
||
136 | */ |
||
137 | 9 | private function getClient() |
|
154 | |||
155 | /** |
||
156 | * @return \GearmanClient |
||
157 | */ |
||
158 | private function createClient() |
||
164 | |||
165 | 1 | private function getPriorityNormalMethod() |
|
175 | } |
||
176 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.