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