oTemporaryObjectManager = TemporaryObjectManager::GetInstance(); } /** * OperationWatchDog. * * Watchdog for delaying expiration date of temporary objects linked to the provided temporary id. * * @return JsonPage */ public function OperationWatchDog(): JsonPage { $oPage = new JsonPage(); // Retrieve temp id $sTempId = utils::ReadParam('temp_id', '', false, utils::ENUM_SANITIZATION_FILTER_STRING); // Delay temporary objects expiration $bResult = $this->oTemporaryObjectManager->ExtendTemporaryObjectsLifetime($sTempId); return $oPage->SetData([ 'success' => $bResult, ]); } /** * OperationGarbage. * * Garbage temporary objects based on expiration date. * * @return JsonPage */ public function OperationGarbage(): JsonPage { $oPage = new JsonPage(); // Garbage expired temporary objects $bResult = $this->oTemporaryObjectManager->GarbageExpiredTemporaryObjects(); return $oPage->SetData([ 'success' => $bResult, ]); } }