feat : Proxy Subject and Database

This commit is contained in:
2025-09-07 11:37:13 +08:00
parent 7d489eecc4
commit 14ba4674ee
11 changed files with 367 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
namespace App\Controller\Test;
use App\Service\Test\Proxy\BasicSubjectService;
use App\Service\Test\Proxy\DynamicProxyService;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
#[Controller(prefix: 'proxy/test')]
class ProxyController
{
/**
* @return array
*/
#[RequestMapping(path: 'basic', methods: 'GET')]
public function basic(): array
{
return (new BasicSubjectService)->handle();
}
/**
* @return array
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
#[RequestMapping(path: 'dynamic', methods: 'GET')]
public function dynamic(): array
{
return (new DynamicProxyService)->handle();
}
}