I try to load a helper module which lives in a camelcased path
$this->load->helper('foo/FooBar/Reporting/reporting');
And it can't be found. On my case insensitive system it works, on my case sensitive it doesn't. The shown error reads:
Unable to load the requested file: helpers/foo/foobar/reporting/reporting_helper.php
Is there any preprocessing of the path, which breaks case? What can I do to get proper case sensitivity?
thanks
Update: I found that the Loader class explicitly transforms paths to lower case (core/Loader.php@_ci_prep_filename). Is there any good reason for that?
I would argue, that the developer has to be responsible for the correct case in loading (via Load) and saving on the filesystem.
Yes, there is a reason for that - we try to enforce our naming conventions where it is appropriate.
You do have a point though. _ci_prep_filename() is only supposed to be applied to _file_ names, directories in the path excluded.
But I have to ask - why do you want to have those subdirs? I can't imagine anyone needing tens of helpers, which would be the only reason to organize them in such a way IMO.
We have something like 30+ helpers. We tend to create many small helpers for special use cases.
Excluding the directory parts from _ci_prep_filesname() would be perfect for me 馃憤
Thanks!
Well, that's what I'll do because that's how it is supposed to work in the first place.
But I have to say, having 30+ helpers is a sign of MAJOR flaws in your design.
Please test with the commit above.
Works like a charm,
thanks for the hint regarding "too many helpers". I will think about this.
Most helpful comment
Please test with the commit above.