Пример #1
0
 public function getRecordedTime()
 {
     $theProject = $this->projectService->getProject($this->projectid);
     $records = $this->projectService->getTimesheetReport(null, $theProject, null, -1, $this->startdate, $this->enddate);
     $userTimeMapping = array();
     foreach ($records as $record) {
         $current = ifset($userTimeMapping, $record->user, 0);
         // go through all times
         foreach ($record->days as $daytime) {
             $current += $daytime;
         }
         $userTimeMapping[$record->user] = $current;
     }
     return $userTimeMapping;
 }