OOP uber noob with general class question....

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

OOP uber noob with general class question....

Post by Burrito »

so far I've gotten away with not using any classes in my "programming" career. I think that it's time to change that however and step up to the plate with OOP.

Before I do, I'd like some general information/guidelines about classes (when to use them, how they work etc).

For starters, I have been unable to even get the sample class (from the manual (the veggie one)) to work so that has been discouraging. I am working in a project now however that I think using a class (or at least a function) might speed things up for me from a processing standpoint. I understand functions very well and use them very regularly, it's just the next step up (to classes) where I get lost. When would I use a class instead of just using line-by-line code or a function? My understanding of classes is taht they are a set of functions that create an object which can be instantiated and then used for data (storage??) and manipulation? (very grey here)....

if someone could please shed some light on classes, how they work, what their purpose is, when to use them...and provide a sample of one (with code and instructions :) ). I'd really appreciate it.

humbly,

Burrito
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

most of your questions, young padawan, have been answered in the Theory board.

as for examples of classes, Code Snippets has many I believe. (ignore mine.. they're probably over your head right now :P)
Post Reply