Re: Common method names (was: "Re: [PEAR-DEV] HTML_Template_IT package release")

From: Date: Sat, 31 Aug 2002 16:01:09 +0000
Subject: Re: Common method names (was: "Re: [PEAR-DEV] HTML_Template_IT package release")
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-8790@lists.php.net to get a copy of this message
On Sat, 31 Aug 2002, Markus Wolff wrote: > I think it would be a wise idea in general to extend the PEAR coding > guidelines with suggestions for some common method names. +1 > So I guess it wouldn´t be too bad to introduce something like this to > PEAR. Say, a common method "get()" for getting a string representation $foo->toString() ? > of a class´ output, "show()" for printing it to the browser. I have been naming the methods getXxx() for getting the value and printXxx() for outputting the value. Although usually including the printXxx() methods is not necessary since you can allways use print $foo->getXxx(). -- Mika Tuupola http://www.appelsiini.net/~tuupola/

« previous php.pear.dev (#8790) next »