Forum Moderators: coopster
What are best practices for creating PHP classes? If I have 3 customer related tables in MySQL and 4 order related tables should I create two classes, one for customer related functions and one for order related functions? Or put all of the functions into one large class?
I'm new to object oriented programming and still trying to get a grasp. I understand the coding aspect, just not the organization.
Thanks
For example:
class Customer {
public customer_id;
public name;
public address;
public credit_card_number;
public social_security_number;
public sex;
public height;
public date_of_birth;
public favorite_movie;
function __construct() {}
public function name() {
return $this->name;
}
}