Re: [CFV] how to mark protected items?

From: Date: Tue, 22 Jun 2004 18:33:47 +0000
Subject: Re: [CFV] how to mark protected items?
References: 1 2 3 4 5 6 7 8 9  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-31095@lists.php.net to get a copy of this message
Joshua Eichorn wrote:
Tomas V.V.Cox wrote:
Joshua Eichorn wrote:
Tomas V.V.Cox wrote:
Nope, for PHP4 is clear stated in CS that needs "_" (http://pear.php.net/manual/en/standards.naming.php). Too much code wrote this way. This discussion should only be for PHP5.
Except thats for private in the standard not protected.
Well, in CS there was no distiction, '_' was for private and protected. Was thought for "protecting" the user not the developer :-) Tomas V.V.Cox
Private class members (meaning class members that are intented to be used only from within the same class in which they are declared; PHP does not yet support truly-enforceable private namespaces) are preceded by a single underscore. For example: Protected means usable only by the class they were declared in or classes extending that class, not the same thing at all. -josh
Both are "internal" to the class, however. IMHO an underscore makes it obvious that it's not to be touched unless you know for sure what it does. -- paperCrane <Justin Patrin>

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