Welcome Guest, Not a member yet? Register   Sign In
Helper documentation does not reflect helper functionality
#1

I'm new to CI and using CI3 on a little project to learn it and came up against this issue last night with helpers:

The documentation I'm referencing: http://www.codeigniter.com/user_guide/ge...lpers.html

I have a helper called string_functions and as per the instructions, I named it MY_string_functions.php and placed it in /application/helpers and called it using
PHP Code:
$this->load->helper('string_functions'); 
, but this gave me an error.

Based on the error, I renamed the file string_functions_helper.php, and all is well.

Am I misinterpreting the documentation, or did the method for calling helpers change and the documentation was not updated?
Reply
#2

The MY_ is only for extending the core helper classes. All other helper can be named like your string example.

Reply
#3

...what Rufnex said... If you wanted, considering that your functions are related to the string manipulation, you could have extended the string helper, by creating MY_string_helper.php
Reply
#4

Thank you both!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB