SpreadQuiz/class/AutoStoring.php
2024-09-25 09:19:28 +02:00

32 lines
608 B
PHP

<?php
class AutoStoring
{
protected bool $autoStoring;
function __construct() {
$this->autoStoring = true;
}
// Disable autostoring feature.
public function disableAutoStoring() : void
{
$this->autoStoring = false;
}
// Enable autostoring feature.
public function enableAutoStoring() : void {
$this->autoStoring = true;
}
// Store modifications.
public function storeMods() : void {
return;
}
public function commitMods() : void {
if ($this->autoStoring) {
$this->storeMods();
}
}
}