Dash to camelCase in Zend Framework

It’s quite simple to transform from dash to camel case in ZF. Since it uses this for matching actions, there are built in filters to do it:


$dashToCamelCaseFilter = new Zend_Filter_Word_DashToCamelCase();
echo ($dashToCamelCaseFilter->filter('my-word') == 'myWord');

Posted Tuesday, August 21st, 2012 under Zend.

Comments are closed.