Automation/app/Libraries/MyCloudflare/MyCloudflare.php
2024-09-22 01:04:33 +09:00

28 lines
777 B
PHP

<?php
namespace App\Libraries\MyCloudflare;
use App\Libraries\MySocket\CloudflareSocket;
use App\Libraries\CommonLibrary;
abstract class MyCloudflare extends CommonLibrary
{
private $_mySocket = null;
protected $_myStorage = null;
protected function __construct($mySocket, $myStorage)
{
parent::__construct();
$this->_mySocket = $mySocket;
$this->_myStorage = $myStorage;
}
abstract protected function getMyStorage(): mixed;
//-----------------------필수항목-------------------//
final protected function getMySocket(): CloudflareSocket
{
if ($this->_mySocket === null) {
throw new \Exception("MySocket이 정의되지 않았습니다.");
}
return $this->_mySocket;
}
}