ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilCronJobResult.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4
12{
15 const STATUS_OK = 3;
16 const STATUS_CRASHED = 4;
17 const STATUS_RESET = 5;
18 const STATUS_FAIL = 6;
19
20 protected $status; // [int]
21 protected $message; // [string]
22 protected $code; // [string]
23 protected $duration; // [float]
24
25 public function getStatus()
26 {
27 return $this->status;
28 }
29
30 public function setStatus($a_value)
31 {
32 $a_value = (int)$a_value;
33 if(in_array($a_value, $this->getValidStatus()))
34 {
35 $this->status = $a_value;
36 }
37 }
38
39 protected function getValidStatus()
40 {
41 return array(self::STATUS_INVALID_CONFIGURATION, self::STATUS_NO_ACTION,
42 self::STATUS_OK, self::STATUS_CRASHED, self::STATUS_FAIL);
43 }
44
45 public function getMessage()
46 {
47 return $this->message;
48 }
49
50 public function setMessage($a_value)
51 {
52 $this->message = trim($a_value);
53 }
54
55 public function getCode()
56 {
57 return $this->code;
58 }
59
60 public function setCode($a_value)
61 {
62 $this->code = $a_value;
63 }
64
65 public function getDuration()
66 {
67 return $this->duration;
68 }
69
70 public function setDuration($a_value)
71 {
72 $this->duration = number_format($a_value, 3, ".", "");
73 }
74}
75
76?>
Cron job result data container.