File: /var/www/quadcode/app/Services/AbstractService.php
<?php
namespace App\Services;
class AbstractService
{
protected array $lastActionLog = [];
public ?string $lastError = null;
protected function resetActionLog(): void
{
$this->lastActionLog = [];
}
protected function addActionLog(string $log): void
{
$this->lastActionLog[] = $log;
}
public function getLastActionLog(): array
{
return $this->lastActionLog;
}
protected function cleanState(): void
{
$this->lastActionLog = [];
$this->lastError = null;
}
}