feat : Proxy Subject and Database
This commit is contained in:
36
app/Controller/Test/ProxyController.php
Normal file
36
app/Controller/Test/ProxyController.php
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user