Class Loading
PermalinkThese are to do with a custom shopping cart that I'm building out are are a 'Basket' and 'Product' object.
If we presume that I will house a class per file, what is considered to be the best practice way of loading these files.
1) As models using Loader::model - if so, where should this call be placed?
2) Using good old require() or include()?
I could really do with some prods in the right direction here so any help would be appreciated.
Regards,
Dan.
I'm a little green still with PHP and Concrete so I was also after a little best practice.
Typically, do you need to include a Loader::model() call in every file where you use that object or is there a better way with less repetition?
Kind regards,
Dan
Makes sense.
then use Loader::model('your_class_file_name'); to load it.