I am trying to improve the way I code and I came up with the following question but couldn't really find an answer.
Lets assume you have an online shop would it be a good idea to have 2 classes that relate to products.
1. product: this will be the actual product and will have properties like sku, price, name, description, etc and methods like save or delete ( I guess these would be for admins only )
2.products: this will be a class that deals with returning a number or product objects...
PHP classes
from PHP https://ift.tt/35PmtXF
via IFTTT
0 Comments