refac,feat: Global/ExecuteEngine

- 턴 실행
- 기존 proc.php와 유사
- 변경된 턴 있음 알림
This commit is contained in:
2022-04-27 02:43:04 +09:00
parent 8d4ce7c23c
commit 0de4476096
3 changed files with 43 additions and 10 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace sammo\API\Global;
use sammo\Session;
use DateTimeInterface;
use sammo\TurnExecutionHelper;
class ExecuteEngine extends \sammo\BaseAPI
{
public function validateArgs(): ?string
{
return null;
}
public function getRequiredSessionMode(): int
{
return static::NO_SESSION;
}
public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
{
$updated = TurnExecutionHelper::executeAllCommand();
return [
'result' => true,
'updated' => $updated,
];
}
}