login을 API로 이동

This commit is contained in:
2021-11-08 02:10:01 +09:00
parent f45e0c9c4b
commit fccc973c8b
11 changed files with 436 additions and 221 deletions
-28
View File
@@ -1,28 +0,0 @@
<?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;
protected string $rootPath;
public function __construct(string $rootPath, array $args)
{
$this->rootPath = $rootPath;
$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;
}
}