add tools request libs, migrate for hyperf framework

This commit is contained in:
2025-11-10 16:48:19 +08:00
parent 5b3b0c70f2
commit 08bb2af2c3
11 changed files with 749 additions and 0 deletions
@@ -0,0 +1,17 @@
<?php
namespace App\Platform\Tools;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestMatcherInterface;
use GuzzleHttp\Psr7\Uri;
class ToolsRequestMatcher implements RequestMatcherInterface
{
public function matches(Request $request): bool
{
$limit = (new Uri(HttpClient::getHost()))->getHost();
return $limit === $request->getHost();
}
}