Archived
1
0
Fork 0

app/config/services.php: in dispatcher make sure the first letter in the action name is lowercase. Also only camelize the delimiters "-_"

This commit is contained in:
Henrik Hautakoski 2018-02-25 19:55:29 +01:00
parent acb547f13c
commit f42cb50a77

View file

@ -41,7 +41,7 @@ $di->setShared('dispatcher', function() use ($di, $config) {
$eventsManager = new Phalcon\Events\Manager();
$eventsManager->attach("dispatch", function($event, $dispatcher) {
$actionName = Phalcon\Text::camelize($dispatcher->getActionName());
$actionName = lcfirst(Phalcon\Text::camelize($dispatcher->getActionName(), '-_'));
$dispatcher->setActionName($actionName);
});