123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace App\HttpController;
- use EasySwoole\Http\AbstractInterface\AbstractRouter;
- use EasySwoole\Http\Request;
- use EasySwoole\Http\Response;
- use FastRoute\RouteCollector;
- class Router extends AbstractRouter
- {
- function initialize(RouteCollector $routeCollector)
- {
-
- $routeCollector->get('/router','/test');
-
- $routeCollector->get('/closure',function (Request $request,Response $response){
- $response->write('this is closure router');
-
- return false;
- });
-
- $routeCollector->get('/skuState','/ProductService/skuState');
- }
- }
|