Skip to content
This repository has been archived by the owner on Jan 4, 2020. It is now read-only.

试问 控制器的明明规则里的 Action 字样是否可以改成 Controller 字样? #43

Closed
cisolarix opened this issue Apr 11, 2013 · 4 comments

Comments

@cisolarix
Copy link

如题。
对于从 CodeIgniter 等框架转过来的同学来说,对于控制器的命名居然是用 控制器内的方法(动作)来命名,引起了不少的混淆。且 MVC 命名规则也是惯例。特提此建议,考虑一下?
@liu21st @luofei614 @Aoiujz

@ghost ghost assigned Aoiujz Apr 11, 2013
@liu21st
Copy link
Member

liu21st commented Apr 11, 2013

这个地方确实是因为历史遗留问题(源于Struts命名),并且为了照顾升级而考虑的,在thinkphp4的设计中已经改为Controller了。
在TP3里面,其实是有折中处理办法的,可以利用分层控制器的概念,你只需要在项目配置文件中设置 DEFAULT_C_LAYER 参数为 Controller即可。这样就会把访问控制器的后缀改成Controller

@liu21st liu21st closed this as completed Apr 11, 2013
@cisolarix
Copy link
Author

好吧,我们现在还在用 2.x 的版本这事,我会跟乃们讲吗?!

@liu21st
Copy link
Member

liu21st commented Apr 11, 2013

2.* 版本只有自行修改核心以便支持了 呵呵~

@cisolarix
Copy link
Author

目前只能这样了

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

No branches or pull requests

3 participants