Initial commit

This commit is contained in:
Rekryt
2024-08-30 15:22:24 +03:00
commit 171e449744
46 changed files with 4638 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace OpenCCK\App\Controller;
use Amp\ByteStream\BufferException;
use Amp\Http\Server\Request;
use OpenCCK\App\Service\IPListService;
use OpenCCK\Infrastructure\API\App;
use Monolog\Logger;
use Throwable;
abstract class AbstractIPListController extends AbstractController {
protected Logger $logger;
protected IPListService $service;
/**
* @param Request $request
* @param array $headers
* @throws BufferException
* @throws Throwable
*/
public function __construct(protected Request $request, protected array $headers = []) {
parent::__construct($request, $this->headers);
$this->logger = App::getLogger();
$this->service = IPListService::getInstance();
}
/**
* @return string
*/
abstract public function getBody(): string;
}