RE: [PEAR-DEV] [PEPr] Comment on RFC::ProtectedMembers

From: Date: Mon, 28 Jun 2004 14:51:59 +0000
Subject: RE: [PEAR-DEV] [PEPr] Comment on RFC::ProtectedMembers
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-31291@lists.php.net to get a copy of this message
>Klaus Guenther (http://pear.php.net/user/thesaur) has commented on the proposal for RFC::ProtectedMembers. > >Comment: > >The current standard states that any method or property prefixed with an underscore is for internal use. The proper >understanding of such methods and properties is that they are protected, not private. The php4 "@access private >means that the marked methods/properties are private/protected. In other words, that they are non-public. (If the >manual states it in any other terms, it is completely belied by usage.) Would it be possible to have the "real" coding standards posted to the pear web site? The current version states: "Private class members (meaning class members that are intented(sic) 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." I am assuming that there is another version out there that reads: "Private/PROTECTED class members (meaning class members that are intended to be used only from within the same class in which they are declared OR WITHIN EXTENDED CLASSES; PHP does not yet support truly-enforceable private/PROTECTED namespaces) are preceded by a single underscore." Having two manuals is confusing to say the least especially when one does not appear to be available to the general public. I am also intrigued by the notion that "@access private" implies that the variable might be protected. I can't help but think that "@access protected" would be a better choice. The phpdoc.org site distingushes between private and protected. Maybe it has two manuals as well?

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