我创造了一个 Zend_Application 使用 zf 与Zend框架捆绑在一起的工具(1.96,如果重要的话)
Zend_Application
zf
格式化操作名的规则是什么?如何将这些操作名转换为URL路径?在框架代码库中,这在哪里发生?
我问是因为我试图创造一个像
public function createFooAction() { }
它不会加载类似
http://example.com/controller/createFoo
但是,以下确实起了作用
public function createfooAction() { } http://example.com/controller/createfoo
我也知道非字母数字字符会受到不同的对待,我想知道我要处理的基本规则。
骆驼壳被翻译成破折号,所以 createFooAction 可作为 http://example.com/controller/create-foo . 你可以使用 Zend Router 添加/更改URL到动作映射。
createFooAction
http://example.com/controller/create-foo