07-19-2012, 05:06 AM
[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.
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.
