Welcome Guest, Not a member yet? Register   Sign In
Codeigniter 4 - Naming Convention & Style Guide

(This post was last modified: 06-01-2020, 08:35 AM by jreklund.)

Stackoverflow link: https://stackoverflow.com/questions/6212...tyle-guide

I have found contradictory rules about Codeigniter 4 naming conventions & style guide. For example following are two guides about class names:
Controller class names MUST start with an uppercase letter and ONLY the first character can be uppercase.
Class names and namespaces SHOULD be declared in UpperCamelCase, also called StudlyCaps, unless another form is functionally required.

Can somebody clarify about method & class naming convention and whether we have different requirements for controllers, models,helpers, etc?

Can I use following convention:
All Classes: Any_class
Methods: any_method

As URL should always be in lowercase so I think camelCase method names should not be used. What is your opinion?
I know its a matter of personal choice but I want to follow best practices.

Messages In This Thread
Codeigniter 4 - Naming Convention & Style Guide - by myo - 06-01-2020, 02:18 AM

Theme © iAndrew 2016 - Forum software by © MyBB