[NFR] dispatcher->getModuleName()
dispatcher has getActionName() and getControllerName(), seems logical to have getModuleName() ?
the dispatcher is unique by each module, if you want to request the active module you can get it using $router->getModuleName()
Why dispatcher can't be a common for all modules and have method getModuleName()? Is it so hard to implement?
modules are initialized and managed by Phalcon\Mvc\Application, each module register different services that sometimes are incompatible between them. for example, the database connection, views service, etc.
since Phalcon\Mvc\Dispatcher doesn't have ability to start modules, it can't forward to other modules
class PostController extends Phalcon\Mvc\Controller
{
public function xAction()
{
$module = $this->router->getModuleName();
}
}
Closed, as this feature is implemented in the router component