Re: Coding standards

From: Date: Mon, 16 Jul 2001 04:16:11 +0000
Subject: Re: Coding standards
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-810@lists.php.net to get a copy of this message
On Sun, Jul 15, 2001 at 02:01:03AM +0200, Erik Hjortsberg wrote: > Is there a reason for us not to make disinction between static and entity > methods and between private and public methods? > I find it very hard to look through the code to figure out which methods I > can call when subclassing or using objects or using classes. > I've always used capitals on static methods and underscore on private. > Thus: > function foo() -- public entity method > function _foo() -- private entity method We also use the leading underscore in Horde to signify a "private" class method. I'm not sure if it's in our coding standards document, but it seems like a good standard convention. > function Foo() -- public static method > function _Foo() -- private static method > Even though php of now isn't case-sensitive when it comes to functions > (which it will be in the future (4.1?)) it would make much more sense. Unfortunately, that breaks PEAR's established bumpyCase() notation. -- Jon Parise (jon@csh.rit.edu) . Rochester Inst. of Technology http://www.csh.rit.edu/~jon/ : Computer Science House Member

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