modifs.mineures sans commentaires
This commit is contained in:
parent
6a4e38e72f
commit
b5b901080c
|
@ -59,12 +59,18 @@ class RunFile {
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** tester si l'application est démarrée */
|
/** tester si l'application a déjà été démarrée */
|
||||||
function isStarted(): bool {
|
function wasStarted(): bool {
|
||||||
$data = $this->read();
|
$data = $this->read();
|
||||||
return $data["date_start"] !== null;
|
return $data["date_start"] !== null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** tester si l'application est démarrée et non arrêtée */
|
||||||
|
function isStarted(): bool {
|
||||||
|
$data = $this->read();
|
||||||
|
return $data["date_start"] !== null && $data["date_stop"] === null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* vérifier si la tâche tourne et est accessible
|
* vérifier si la tâche tourne et est accessible
|
||||||
*/
|
*/
|
||||||
|
@ -90,15 +96,22 @@ class RunFile {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** tester si l'application est arrêtée */
|
/** tester si l'application est déjà été stoppée */
|
||||||
function isStopped(): bool {
|
function wasStopped(): bool {
|
||||||
$data = $this->read();
|
$data = $this->read();
|
||||||
return $data["date_stop"] !== null;
|
return $data["date_stop"] !== null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** tester si l'application a été démarrée puis arrêtée */
|
||||||
|
function isStopped(): bool {
|
||||||
|
$data = $this->read();
|
||||||
|
return $data["date_start"] !== null && $data["date_stop"] !== null;
|
||||||
|
}
|
||||||
|
|
||||||
function haveWorked(int $serial, ?int &$currentSerial=null): bool {
|
function haveWorked(int $serial, ?int &$currentSerial=null): bool {
|
||||||
$data = $this->read();
|
$data = $this->read();
|
||||||
return $serial !== $data["serial"];
|
$currentSerial = $data["serial"];
|
||||||
|
return $serial !== $currentSerial;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function willWrite(): array {
|
protected function willWrite(): array {
|
||||||
|
|
Loading…
Reference in New Issue