基类和工具类
Some checks failed
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
Tests / PHP 8.4 (push) Has been cancelled

This commit is contained in:
2025-05-04 22:42:51 +08:00
parent ba260c2bf4
commit 0bfe7786d3
6 changed files with 559 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace App\BaseApp;
class BaseClient
{
private static mixed $_instance;
/**
* 获取实例
* @return null|static
*/
public static function getInstance(): null|static
{
$name = get_called_class();
if (!isset(self::$_instance[$name])) {
self::$_instance[$name] = new static();
}
return self::$_instance[$name];
}
}