Welcome Guest, Not a member yet? Register   Sign In
Controllers based multiple sub-folders/directories deep
#1

[eluser]domainsvault[/eluser]
I have a requirement to organize the internal structure a little better than it is now as we are expanding our services from just the web to web, mobile apps, and api. From this we want and mostly in the API organization to have a folder structure like:

Code:
controllers/
-api
--mobile
---1.0
----some_controller.php
----some_controller.php
----some_controller.php
--service1
---1.0
----some_controller.php
----some_controller.php
----some_controller.php
--service2
---1.0
----some_controller.php
----some_controller.php
----some_controller.php
-base_controller.php
-base_controller2.php
-base_controller3.php

I have found plenty of documents about 1.7.x and people hacking into the core code of CI to achieve a similar goal. However I do not wish to hack into anything core of CI for multiple reasons. I have also in the same reading found that 1.7.x changes don't really work well in 2.x.x versions of CI so. How is it I can achieve the goal I seek without having to have multiple instances of CI spread across my servers? Any ideas how I can extend CI from within the application level inward to be able to support normal controller logic but where there is a folder or multiple folders deep there in, pick up on the fact that its a folder and then treat the controller normally from there? Im open to suggestions. I would prefer to extend in one form or another and not hack into existing if possible.




Theme © iAndrew 2016 - Forum software by © MyBB