Page 1 of 1
Class names
Posted: Fri Nov 11, 2005 1:36 pm
by Luke
What's the standard way of naming classes?
Posted: Fri Nov 11, 2005 2:00 pm
by Jenk
Pick a name.. use it.
Is this really that hard to work out?!
Take a look through
http://pear.php.net to get an idea, if it's really that difficult

Posted: Fri Nov 11, 2005 2:06 pm
by Luke
I was just wondering if there was a standard. I'm trying to make things as easy to read as possible.
Burrito:content edited.
Posted: Fri Nov 11, 2005 2:06 pm
by Charles256
(unable to delete this.ignore this post)
Posted: Fri Nov 11, 2005 2:11 pm
by redmonkey
In a similar vein to functions, some name which offers a description of what that class does.
It's all matter of personal preference, some people prefer to capitalise the first letter of there class name, others prefer a CamelCase style i.e. a class which handles sessions may be called SessionHandler or Session_handler or variations of. There is (as far as I'm aware) no real standard.
PEAR have documented their coding standard/style although I'm not sure if this extends to naming conventions but it may be worth a look to get a general idea of at least one style. Personally I don't adhere to PEAR standards but as I said it's all down to personal preference.
Posted: Fri Nov 11, 2005 2:23 pm
by Luke
OK, charles... I'll refrain from using this site for its purpose. Thanks buddy.
Posted: Fri Nov 11, 2005 2:29 pm
by Charles256
awww.don't be like that. where's the smiley that looks like a hug ?

I apologize if I sincerly hurt your feelings.
Posted: Fri Nov 11, 2005 3:05 pm
by Luke
I love you charles.. let's make out.
Posted: Fri Nov 11, 2005 3:33 pm
by Charles256
slow your role..let's not get carried away with ourselves now..