Re: [PHP] Question about OO design

2007-04-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-09 15:29:01 -0700: (I'm dealing with PHP4.) class User { var id; var name; var email; var balance; var accrual; var is_manager; function User($user_id) { $this-id = $user_id;

RE: [PHP] Question about OO design

2007-04-10 Thread Chris W. Parker
On Monday, April 09, 2007 4:24 PM Jochem Maas mailto:[EMAIL PROTECTED] said: Ok. I see what you're saying. If I populate all that data during the constructor why would I ever call the function again right? you could refresh the data if needed - but basically the idea is to cut down the user

[PHP] Question about OO design

2007-04-09 Thread Chris W. Parker
Hello, I'm working on a project now and I'd like to get some feedback on how to implement a proper class (or two). This is an application that records an employee's used vacation time. There are two tables: (1) events, (2) users. Users: id (int) name (varchar) email (varchar) balance

Re: [PHP] Question about OO design

2007-04-09 Thread Jochem Maas
Chris W. Parker wrote: Hello, I'm working on a project now and I'd like to get some feedback on how to implement a proper class (or two). This is an application that records an employee's used vacation time. There are two tables: (1) events, (2) users. Users: id (int) name

RE: [PHP] Question about OO design

2007-04-09 Thread Chris W. Parker
On Monday, April 09, 2007 3:51 PM Jochem Maas mailto:[EMAIL PROTECTED] said: Thanks for the response Jochem. Chris W. Parker wrote: [snip] you probably only want one DB call to populate the User object with all the relevant user data at the point where the object is created. [snip] Ok. I

Re: [PHP] Question about OO design

2007-04-09 Thread Jochem Maas
Chris W. Parker wrote: On Monday, April 09, 2007 3:51 PM Jochem Maas mailto:[EMAIL PROTECTED] said: Thanks for the response Jochem. Chris W. Parker wrote: [snip] you probably only want one DB call to populate the User object with all the relevant user data at the point where the