
Originally Posted by
Lemon Juice
Sometimes this allows me to call a controller from another controller and feed it my desired request values without affecting the $_GET/$_POST superglobals. I've heard it's not a good idea to reuse controllers but anyway I do it vary rarely.
Off Topic:
Controllers shouldn't ever need to be chained in this way because controllers should just take user input and use it to set the model's state. If you're chaining like this what you should really be doing is setting the model's state from the active controller and rendering the required view. If you're finding the need to call controllers, it almost certainly means you have model state and/or logic in the controller.
Bookmarks