I'm using Controller_Rest to build a REST API. I have many resources so the controller (Controller_Api) is getting huge. I was thinking of splitting the controller up into one controller per resource. Instead of having Controller_Api in classes/controller/api.php I would have a controller for each resource in classes/controller/api/
I'm not sure if this is a good idea or not. Controller_Rest also doesn't appear to support this since it always looks for method_resource functions. I would probably just have a function for each method
Is there a simple way to do this or should I just add this functionality to Controller_Rest? Or is there a better way I could structure the code?
Thanks
If you create a folder called 'api' in which you have multiple controllers, that would translate to URI's like '/api/controllername/...' which implements the split of controllers without any further action needed.