api: 규격 정의

This commit is contained in:
Hide_D committed 2021-09-12 04:59:34 +09:00
1 parent 3e2df1d4d8
commit d926e4b8bc
7 files changed
+620 -438

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
<?php
namespace sammo;
abstract class BaseAPI
{
const NO_SESSION = 0;
const REQ_LOGIN = 1;
const REQ_GAME_LOGIN = 2;
const REQ_READ_ONLY = 4;
protected array $args;
public function __construct(array $args)
{
$this->args = $args;
}
abstract public function getRequiredSessionMode(): int;
abstract function validateArgs(): ?string;
/** @return null|string|array */
abstract function launch(?Session $session, ?\DateTimeInterface $modifiedSince, ?string $reqEtag);
public function tryCache():?string{
return null;
}
}