Welcome Guest, Not a member yet? Register   Sign In
Why CI3 requires ucfirst-case names for all classes?
#2

(03-02-2015, 04:16 PM)Maximw Wrote: Hello.
I can not understand this innovation. Why I can not name classes as I want, in CamelCase or in snake_case? Just autoload file for class with same name and .php extension. What's problem?
Thank you.

I don't know the reasoning, but my guess would be for maximum compatibility across operating systems. I know that in the past I've hit problems where I was developing on a Mac (with a case-insensitive filesystem) then had things not work when pushed onto other servers running traditional flavors of linux, that did have a case-sensitive filesystem.

Other than the first letter, though, you can name it however you want.

And besides, every framework will have standard workflows they encourage or enforce. That's just part of the deal when you use someone else's codebase.
Reply


Messages In This Thread
RE: Why CI3 requires ucfirst-case names for all classes? - by kilishan - 03-03-2015, 11:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB