Zend Framework long names for Controller Actions

I started working on Zend Framework some days ago. Recently, I encountered an issue with the Controller actions.

I wanted to have a controller action with name getRecordsByCountryAction in one of my controllers. To my surprise, this did not work despite the fact that it was in accordance with the camel Case convention of naming. 
I spent some hours googling on this issue however could not find the solution, Finally, I found that, the long names will not work as usual short name camel cases. 
The long name has to be accessed using ‘-’ or ‘.’ in the small case words of the action name in browser.
So my action would become ‘get-records-by-country‘ or ‘get.records.by.country‘ when I have to access it from browser. My full url request would be ‘/admin/country/get-records-by-country/country_id/2′
Somewhat confusing! yet working.
Happy PHPing.
This entry was posted in Zend Framework. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>