Nested controllers

Hi. In my project in controllers folder there are many controllers. So i want to create sub folders in controllers folder and separate them in sub folders. How can i do this? Controller is going to be inside: module/controllers/subcontrollers/IndexController.php

thanks.

First I suppose that you want to have multiple subfolders(in case you want only one subfolder, you would need just to change _controllerPath property oc CWebApplication).

You would need to extend CWebApplication, and modify createController method, to include controllers from few folders(lines 341-350). SHouldn’t be hard task, because you can search if controller class exist in each of subfolders, and if does return it.

Also you would need to modify getControllerPath and setControllerPath methods to accept arrays instead of strings(or even better to allow them to accept mixed values).

Hope this will help you.