/** * Returns the controller class of the given request class. The class name is imploded by '_' * @param Enlight_Controller_Request_Request $request * @return array|string */ public function getControllerClass(Enlight_Controller_Request_Request $request) { if (!$request->getControllerName()) { $request->setControllerName($this->defaultController); } if (!$request->getModuleName()) { $request->setModuleName($this->defaultModule); } $module = $request->getModuleName(); $this->curModule = $module; $this->curDirectory = $this->getControllerDirectory($module); $moduleName = $this->formatModuleName($module); $controllerName = $this->formatControllerName($request->getControllerName()); $class = array(Enlight_Application::Instance()->App(), 'Controllers', $moduleName, $controllerName); $class = implode('_', $class); return $class; }