Results 1 to 11 of 11
Mar 3, 2003, 15:54 #1
- Join Date
- May 2002
- 0 Post(s)
- 0 Thread(s)
help on getting ideas around first class
Ok, I want to do classes, my work is getting to big and I am rewriting too much code.
So I got the Wrox professional php book and went through it...I also have been looking at everything I can get my hands on online.
So the first project is to do a class for login and authentication management. I searched the forums and found a couple of previous posts and there was one thing I did not get.
In my class I am thinking I should have the following functions:
adduser - insert a new user
reset_passwd - ummm...reset a users password
edit_info - for updating info like email
check_permissions - return true if they have a certain permission
login_form - to echo the login form to make it easy to include on multiple pages
All of this leads me to a couple questions...
where does a constructor fit into this?
Is a constructor really required?
Does this really fit as a class, or just a group of functions?
While I have done some C++ work in classes and some Java, I have not tried to fit classes to php where it seems to be more procedural.
Can anyone help clear this up a bit for me. I would appreciate it.
"Techies just think a little differently
...at least that is what they keep telling me."