@@ 70-78 (lines=9) @@ | ||
67 | * @throws exceptions\LPTrackerResponseException |
|
68 | * @throws exceptions\LPTrackerServerException |
|
69 | */ |
|
70 | public function getProjects() |
|
71 | { |
|
72 | $response = LPTrackerRequest::sendRequest('/projects', [], 'GET', $this->token, $this->address); |
|
73 | $result = []; |
|
74 | foreach ($response as $projectData) { |
|
75 | $result[] = new Project($projectData); |
|
76 | } |
|
77 | return $result; |
|
78 | } |
|
79 | ||
80 | /** |
|
81 | * @param Project|int $project |
|
@@ 197-205 (lines=9) @@ | ||
194 | * @throws exceptions\LPTrackerResponseException |
|
195 | * @throws exceptions\LPTrackerServerException |
|
196 | */ |
|
197 | public function getEmployees() |
|
198 | { |
|
199 | $response = LPTrackerRequest::sendRequest('/staff', [], 'GET', $this->token, $this->address); |
|
200 | $result = []; |
|
201 | foreach ($response as $employeeData) { |
|
202 | $result[] = new Employee($employeeData); |
|
203 | } |
|
204 | return $result; |
|
205 | } |
|
206 | ||
207 | /** |
|
208 | * @param Project|int $project |