You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This, besides calling controllers programmatically, can also handle nested controllers, that will not be accessible through a URL (such as headers, footers, views that depend on others...).
I added it to the controller class, where it fits me, but I guess it could also be a native helper.
I'm not sure if you think this is a good call though. But for the way I like to organize things, this suits me really well.
Do you see any problem with this approach? I tested it and it seems to not break anything, keeping the 'original API' untouched.
P.S. - I also added this to helpers and models in pip.php as they are instanciated with the 'new' keyword. I did not add it to controllers there because it would lead to weird behaviours with the URL and would loose the beautiful simplicity it has.
Hello,
I am using this framework to build a slightly-more-than-trivial website, so I need a stronger folder organization.
I implemented a way to handle nested controllers (as in inside folders on the 'controllers' folder) nativelly, with this code:
This, besides calling controllers programmatically, can also handle nested controllers, that will not be accessible through a URL (such as headers, footers, views that depend on others...).
I added it to the controller class, where it fits me, but I guess it could also be a native helper.
I'm not sure if you think this is a good call though. But for the way I like to organize things, this suits me really well.
Do you see any problem with this approach? I tested it and it seems to not break anything, keeping the 'original API' untouched.
P.S. - I also added this to helpers and models in pip.php as they are instanciated with the 'new' keyword. I did not add it to controllers there because it would lead to weird behaviours with the URL and would loose the beautiful simplicity it has.
NOTE: The plugin and view loader already handle this nativelly, because of they way they are implemented.
Thanks!
The text was updated successfully, but these errors were encountered: