OGoManager($server); } function constructResult($values) { $result = array(); for($i = 0; $i < count($values); $i++) array_push($result, new OGoTask($this, $values[$i])); return $result; } function getDelegatedTasks() { list($result, $values) = $this->xmlrpcCallMethod("jobs.getDelegatedJobs"); if ($result) return $this->constructResult($values); else $this->managerError($value); } function getToDoList() { list($result, $values) = $this->xmlrpcCallMethod("jobs.getToDoList"); if ($result) return $this->constructResult($values); else $this->managerError($value); } function getArchivedTasks() { list($result, $values) = $this->xmlrpcCallMethod("jobs.getArchivedJobs"); if ($result) return $this->constructResult($values); else $this->managerError($value); } } //////////////////////////// // CLASS: OGoTask /////////////////////////// class OGoTask extends OGoDocument { var $history; function OGoTask($manager, $values) { $this->OGoDocument($manager, $values); } function getIsTeamJob() { return $this->values["isTeamJob"]; } function getName() { return $this->values["name"]; } function getISOStartDate() { return $this->values["startDate"]; } function getStartDate($format = "d F Y (D)") { return date($format, iso8601_decode($this->values["startDate"])); } function getISOEndDate() { return $this->values["endDate"]; } function getEndDate($format = "d F Y (D)") { return date($format, iso8601_decode($this->values["endDate"])); } function getKeywords() { return $this->values["keywords"]; } function getCategory() { return $this->values["category"]; } function getStatus() { return $this->values["status"]; } function getVanityStatus() { switch ($this->values["status"]) { case "00_created": return "Created"; break; case "02_rejected": return "Rejected"; break; case "05_accepted": return "Accepted"; break; case "20_processing": return "Open"; break; case "25_done": return "Closed"; break; } return "Undefined"; } function getPriority() { return $this->values["priority"]; } function getVanityPriority() { switch ($this->values["priority"]) { case 1: return "Very High"; break; case 2: return "High"; break; case 3: return "Average"; break; case 4: return "Low"; break; case 5: return "Very Low"; break; } return "Undefined"; } function getCreatorId() { return $this->values["creator"]["id"]; } function getCreatorLogin() { return $this->values["creator"]["login"]; } function getExecutorId() { return $this->values["executor"]["id"]; } function getExecutorLogin() { return $this->values["executor"]["login"]; } function getExecutorCN() { return $this->values["executor"]["info"]; } function refresh() { } } ?>