how to naming the model, view, controller files?2 users found helpful
2. How to naming the controller class ?
if i had a single_pages file in my directory path
I also created my controller file my directory path
How can i give the controller class name ?
3. There is any restriction to naming the models file?
and the directory path should be same ?
anyone could explain it plzzzzzz....
Thanks in advance...
I should also mention that the concrete naming convention is to use underscores in file names. So you would probably want to call the file my_file_a.php. This wouldn't change the name of the controller though.
I don't believe there is any naming requirements for models. If you had a file: models/my_model_a.php you should be able to name the class whatever you want then load it in with
Hope that helps
can i use controller class name
there is no case sensitive issue in it ?
It my sub directory MyProfile already contains the camel case, and my file name (MyfileA.php) contains the alternate camel case...
In that case how can i use controller class name ?
If you had MyfileA.php and my_file_a.php their respective controller names would be:
DashboardMyProfileMyfileaController //this is for MyfileA
DashboardMyProfileMyFileAController //this is for my_file_a
Only the underscores are translated to camel case.
While this works, I would recommend you always use the concrete5 convention of naming your files with underscores. It will make life much easier for you.
i have a little bit doubt in models directory...
if i use my view file in the directory path
i had a corresponding controller file in the directory path
How to place my corresponding model file...
is there is any restriction in directory path ?
i should use my directory path like this?
is this necessary ?
Please clear my doubt...
Then you would do:
However, if it works better for you to put it in a subfolder for organizational purposes you can certainly do that. So if you have
You can load it in with:
Does that help?
And two more questions i have...
1. There is any restrictions in naming for class in concrete5 mvc...?
2. In concrete5, they follow any standardized directory structure...?
It just read the
For standardized coding style guideline to understand other developers only they use camel case & give some restrictions to naming the directory and files also for classes...
i got this reference from vektor larsson...
Thanks to vektorlarsson (vlarsson)...
he pointing this link for me...
thanks to you bbeng89 for clear my doubts about models directory and class naming format...