getGeneral()->getID(); $executeKey = "next_execute_{$generalID}_{$userActionKey}_{$turnKey}"; return $executeKey; } public function getNextAvailableTurn():?int{ if($this->isArgValid && !$this->getPostReqTurn()){ return null; } $rawUserAction = $this->generalObj->getAuxVar(static::USER_ACTION_KEY); if($rawUserAction === null){ return null; } $userAction = \sammo\DTO\UserAction::fromArray($rawUserAction); $nextAvailableTurn = $userAction->nextAvailableTurn; if($nextAvailableTurn === null){ return null; } $nextAvailableTurn = $nextAvailableTurn[static::$actionName] ?? null; } public function setNextAvailable(?int $yearMonth=null){ if(!$this->getPostReqTurn()){ return; } $rawUserAction = $this->generalObj->getAuxVar(static::USER_ACTION_KEY); if($rawUserAction === null){ $rawUserAction = []; } $userAction = \sammo\DTO\UserAction::fromArray($rawUserAction); if($userAction->nextAvailableTurn === null){ $userAction->nextAvailableTurn = []; } $userAction->nextAvailableTurn[static::$actionName] = $yearMonth; $this->generalObj->setAuxVar(static::USER_ACTION_KEY, $userAction->toArray()); } };