I want to add some new functions to the core string
helper which is found in system/helpers folder. I think there was a 'right' way to do this using MY_String_helper
or something of that sort but I can't remember exactly how it was done. Any thoughts?
views:
245answers:
2
+2
A:
I found it. Make a file with a name such as this, in the application/helpers
directory:
MY_xx_helper.php
E.g:
MY_string_helper.php
Then you can call
$this->load->helper('string');
And it should load all the existing helper functions as well as the new ones you add.
Click Upvote
2009-05-07 12:37:50
+2
A:
Doing that you can not only add new functions but replace exising helper functions.
Phil Sturgeon
2009-06-17 14:58:41
You should click add comment and post it as a comment next time instead of as a new answer :)
Click Upvote
2009-06-17 16:53:19