ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 {
14  const STATUS_NO_ACTION = 2;
15  const STATUS_OK = 3;
16  const STATUS_CRASHED = 4;
17  const STATUS_RESET = 5;
18  const STATUS_FAIL = 6;
19 
20  const CODE_NO_RESULT = 'job_no_result';
21  const CODE_MANUAL_RESET = 'job_manual_reset';
22  const CODE_SUPPOSED_CRASH = 'job_auto_deactivation_time_limit';
23 
24  protected $status; // [int]
25  protected $message; // [string]
26  protected $code; // [string]
27  protected $duration; // [float]
28 
32  public static function getCoreCodes()
33  {
34  return array(
35  self::CODE_NO_RESULT, self::CODE_MANUAL_RESET, self::CODE_SUPPOSED_CRASH
36  );
37  }
38 
39  public function getStatus()
40  {
41  return $this->status;
42  }
43 
44  public function setStatus($a_value)
45  {
46  $a_value = (int)$a_value;
47  if(in_array($a_value, $this->getValidStatus()))
48  {
49  $this->status = $a_value;
50  }
51  }
52 
53  protected function getValidStatus()
54  {
55  return array(self::STATUS_INVALID_CONFIGURATION, self::STATUS_NO_ACTION,
56  self::STATUS_OK, self::STATUS_CRASHED, self::STATUS_FAIL);
57  }
58 
59  public function getMessage()
60  {
61  return $this->message;
62  }
63 
64  public function setMessage($a_value)
65  {
66  $this->message = trim($a_value);
67  }
68 
69  public function getCode()
70  {
71  return $this->code;
72  }
73 
74  public function setCode($a_value)
75  {
76  $this->code = $a_value;
77  }
78 
79  public function getDuration()
80  {
81  return $this->duration;
82  }
83 
84  public function setDuration($a_value)
85  {
86  $this->duration = number_format($a_value, 3, ".", "");
87  }
88 }
89 
90 ?>
Create styles array
The data for the language used.
Cron job result data container.