Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
askme-gpt opened this issue Sep 8, 2020 · 5 comments
Open

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

askme-gpt opened this issue Sep 8, 2020 · 5 comments

Comments

@askme-gpt
Copy link

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

@laruence
Copy link
Owner

laruence commented Jan 6, 2021

  1. 是怎么不方便呢?

@reatang
Copy link

reatang commented Jan 22, 2021

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

@thinkeng
Copy link

thinkeng commented Jan 26, 2021

我觉得,差个router 层吧

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

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

@chenliq
Copy link

chenliq commented Mar 9, 2021

我觉得,差个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
Copy link

chenliq commented Mar 9, 2021

  1. 是怎么不方便呢?

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants