Can I nest CodeIgniter "Helpers" in sub directories?

codeigniter

Solution

Yes you can store and load as follows (tested)

$this->load->helper('myHelperSubFolder/myHelperName');

Even in your `autoload.php` you can load a helper as follows

$autoload['helper'] = array('url','myHelpers/functions_helper'); // 'myHelpers' is the folder inside my helper folder and 'functions_helper' is my helper file.

Problem

I know I can nest libraries in subfolders, but can I do the same for Helpers? The end result would be to have something to the effect of: ``` application/helpers/foo/bar_helper.php application/helpers/baz_helper.php ``` Then call the helpers with: ``` $this->load->helper('foo/bar'); $this->load->helper('baz'); ```

Original source