Add ability to use classes for helpers
Add ability to use classes for helpers instead of functions in global namespace.
I was always wondering "why functions for helpers ??".
Of course I can create my own classes in /lib... but helpers are just some short template piece of code.
And what if I want extends an existing helper ? No I can not ! I can just replace the whole helper in my project....
Actual helpers (and load by use_helper('Text')) make no sense to me. Why ?
With basic classes, auto loading should be possible, inheritence, etc...
Please, Keep It Simple... but not Supid :p
Helpers are proliferating, sooner or later we won't be so crazy about mashing them all into one namespace on purpose.
True Tommy. But i disagree. It would be nice if for example the template itself contained a var that contained the helpers. I imagine this as a "manager" class instance with array access and/or proxy calls to the helper classes. There's nothing preventing one from doing this now, it would just be nice to have it done for you by default, with the option of turning it off in project or app settings.
This is already supported, just write a plugin with classes in its lib folder. You can call the public static methods in those classes from anywhere and they will be autoloaded.