Welcome Guest, Not a member yet? Register   Sign In
CI filenaming conventions.... grrrr....
#1

[eluser]Mirage[/eluser]
Hi -

I've been doing a lot of CI work over the past couple of years, most of it on a customized version of 1.5.4. Recently I started two new projects based on 1.6.3. And I'm running into darned errors when CI is attempting to load classes (be it models, controllers or libraries). I'd overridden the Loader in 1.5.4 to load files exactly the way they were called.

The reason for this was obviously support for deployment on case-sensitive OS. I develop on Mac X and that filesystem is case-insensitive.

The point is that insensitive systems don't care, but sensitive ones do. So why does CI insist that I name my configs, etc in lower case? What not just load what I tell it to load?

At any rate, after loosing some more hair over this and really no desire to keep overriding things that may have otherwise changed in the core I was looking for a table of naming conventions in the user guide but couldn't find any.

Does anyone have such a thing and - unless it exists - could EL please add it to the User Guide? Thanks.

-m
#2

[eluser]xwero[/eluser]
Config, language and view files don't have to be lowercased, the other loaded files have to be lower cased. The reason for this is to prevent files to load multiple times and in the case of controllers and models you get errors if you try to load a class more than once.
#3

[eluser]Mirage[/eluser]
Thanks -

First - I have a library named Auth.php And a matching config named Auth.php. On my case-sensitive server OS , CI will not pass this config into the library. If I rename it to 'auth', then it works.

As for the loader trying to avoid multiple loads - I'm sure that the loader could track loaded object with case insensitive keys, without requiring the filenames to be case insensitive. As I said, I did extend the 1.5.4 loader to take care of this. I just didn't want to do it again, because every time CI gets updated, I have to ascertain that my overrides are still compatible, which is a PITA.

Cheers,
-m
#4

[eluser]Marcelo Toscano[/eluser]
[quote author="Mirage" date="1223685174"]Thanks -

First - I have a library named Auth.php And a matching config named Auth.php. On my case-sensitive server OS , CI will not pass this config into the library. If I rename it to 'auth', then it works.
-m[/quote]

I've same problem but I dont have a diferente version to solve my problem.
is there a config file ou another thing to solve this ?
#5

[eluser]Mirage[/eluser]
No config option for this. You gotta do as CI says.

I actually don't have a problem with it per-se. The rule is the rule. But I develop on this advanced OS called OSX which is case insensitive and that causes problems with the publishing targets that or case-sensitive. I even reformatted my system to use case-sensitive HFS only to find out that Adobe's stuff (of all!) doesn't work with it. After changing filesystems twice just to enforce discipline on my part, I finally decided to just use PostIt sticker to remind me of the rules. :-)

Cheers,
-m




Theme © iAndrew 2016 - Forum software by © MyBB