| @@ 62-71 (lines=10) @@ | ||
| 59 | * @param $track The track object |
|
| 60 | * @return string |
|
| 61 | */ |
|
| 62 | public function getTrackStatus($track) |
|
| 63 | { |
|
| 64 | foreach ($this->sequentialStatus as $status) { |
|
| 65 | if (!is_null($track->{$status})) { |
|
| 66 | return substr($status, 0, -3); |
|
| 67 | } |
|
| 68 | } |
|
| 69 | ||
| 70 | throw new Exception("Can't find the right column to track the Qwatcher", 1); |
|
| 71 | } |
|
| 72 | ||
| 73 | /** |
|
| 74 | * Get current Status prias text, tracking by sequential of status datetime |
|
| @@ 79-88 (lines=10) @@ | ||
| 76 | * @param $track The track object |
|
| 77 | * @return string |
|
| 78 | */ |
|
| 79 | public function getTrackStatusTime($track) |
|
| 80 | { |
|
| 81 | foreach ($this->sequentialStatus as $status) { |
|
| 82 | if (!is_null($track->{$status})) { |
|
| 83 | return $track->{$status}; |
|
| 84 | } |
|
| 85 | } |
|
| 86 | ||
| 87 | throw new Exception("Can't find the right column to track the Qwatcher", 1); |
|
| 88 | } |
|
| 89 | } |
|
| 90 | ||