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

The CI2 convention is equally (if not moreso) arbitrary. For an example, see the user guide's page on controllers: http://www.codeigniter.com/user_guide/ge...html#hello

Quote:Let's create a simple controller so you can see it in action. Using your text editor, create a file called blog.php, and put the following code in it:

Then, further down the page:
Quote:Note: Class names must start with an uppercase letter.

So, the explanation for the ucfirst file name in CI3 is to conform to the normal association between class name and file name. In CI2, your blog.php file contained a class named Blog. In CI3, the Blog.php file contains a class named Blog.
Reply


Messages In This Thread
RE: Why CI3 requires ucfirst-case names for all classes? - by mwhitney - 03-05-2015, 10:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB