• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Class naming conventions

#1
[eluser]deed02392[/eluser]
I've noticed I keep on clashing class names, although I feel like what I'm doing makes sense...

I've got a controller which takes all actions to do with stock, 'class Stock extends MY_Controller'.

Then I've got a model which handles all the data input/output to do with stock, obviously:
'class Stock extends CI_Model'.

Then I get the error cannot redeclare class, of course. But surely it makes sense these are both called 'Stock' since that's each what their primary functions pertain to. Surely I'm not expected to name these 'Stock_controller' and 'Stock_model' or something? Some guidance please. Smile


Messages In This Thread
Class naming conventions - by El Forum - 07-19-2012, 05:06 AM
Class naming conventions - by El Forum - 07-19-2012, 05:47 AM
Class naming conventions - by El Forum - 07-19-2012, 03:42 PM
Class naming conventions - by El Forum - 07-19-2012, 04:28 PM
Class naming conventions - by El Forum - 07-19-2012, 05:51 PM
Class naming conventions - by El Forum - 07-19-2012, 08:48 PM
Class naming conventions - by El Forum - 07-19-2012, 11:32 PM
Class naming conventions - by El Forum - 07-20-2012, 07:45 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.