yaf icon indicating copy to clipboard operation
yaf copied to clipboard

[建议]对于使用了yaf之后的几个小建议

Open askme-gpt opened this issue 4 years ago • 5 comments

1.希望能够支持完整规范的命名空间; 2.路由能否改进一下,现在的不是很方便; 3.能否整合一下swoole,进一步提高性能?

askme-gpt avatar Sep 08 '20 14:09 askme-gpt

  1. 是怎么不方便呢?

laruence avatar Jan 06 '21 04:01 laruence

yaf是一个开源自由项目,swoole是一个开源商业项目。 怎么总有人想让他们整合呢。。。。。

reatang avatar Jan 22 '21 03:01 reatang

我觉得,差个router 层吧

https://docs.phalcon.io/4.0/en/routing

add( '/admin/invoices/list', [ 'controller' => 'invoices', 'action' => 'list', ] );

thinkeng avatar Jan 26 '21 09:01 thinkeng

我觉得,差个router 层吧

https://docs.phalcon.io/4.0/en/routing

add( '/admin/invoices/list', [ 'controller' => 'invoices', 'action' => 'list', ] );

有这个功能了: $router = Yaf\Dispatcher::getInstance()->getRouter(); $router->addConfig([ [ 'type' => 'rewrite', 'match' => '/admin/invoices/list', 'route' => [ 'module' => 'index', 'controller' => 'index', 'action' => 'b' ] ] ]);

chenliq avatar Mar 09 '21 09:03 chenliq

  1. 是怎么不方便呢?

建议给不同的路由类型在文档里面多给几个示例就好了。

chenliq avatar Mar 09 '21 09:03 chenliq