refac,feat: Global/ExecuteEngine
- 턴 실행 - 기존 proc.php와 유사 - 변경된 턴 있음 알림
This commit is contained in:
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user