Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zend Framework: Using Dashes in Controller Names/URLs

I have a URL I would like to look something like http://server/my/action-name

Obviously, I can't have a - in the ControllerName function and an underscore doesn't work. Is this even possible?

like image 818
ashurexm Avatar asked Aug 06 '10 17:08

ashurexm


2 Answers

By default

http://server/my/action-name

will map to

MyController::actionNameAction()

but you can also setup arbitrary routes with the Standard Router.

like image 96
Gordon Avatar answered Sep 19 '22 22:09

Gordon


use camel casing. It works for actions:

function actionNameAction()
like image 24
iBiryukov Avatar answered Sep 19 '22 22:09

iBiryukov