32 lines
608 B
PHP
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();
|
|
}
|
|
}
|
|
} |