Router short syntax and multi-word controller names

The short syntax seems to be incompatible with controller classes containing multiple words.


class ProductCategoryController {
  function indexAction() { ... }

$router->add("/products/categories", "ProductCategory::index");
print $router->getControllerName();

getControllerName() returns an all lowercase controller name and the dispatcher looks for a class called ProductcategoryController. Instead of simply lowercasing wouldn't it make more sense to use snake-case. Then transformation can be reversed and the dispatcher can resolve the controller name properly.


Good point and I agree, can you please open a NFR for this on Github?


Thanks Tim

I know this post is old, but this should also be added in docs since is quite important. It took me 2 hours to find how phalcon is handling multi word controllers. Thanks