Re: Re: [CFV] how to mark protected items?
| From: | Stephan Wentz | Date: | Wed, 16 Jun 2004 06:48:31 +0000 |
| Subject: | Re: Re: [CFV] how to mark protected items? | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-30717@lists.php.net to get a copy of this message | ||
Hans Lellelid wrote:
Whether or not my vote should count, I'll give it since I have a package in-proposal. [I'm assuming this is for PHP5 only]Does PHP5 complain about these things on E_FATAL? I thought only on E_STRICT... And using E_STRICT with existing non-PHP5-PEAR-packages is really a pain in the $%& ;-) So I think this is not reasonable, the main function of the underscore was to mark private Methods/Properties, so you don't accidently use them from outside class-context in PHP4. For protected stuff this remains the same, it can be overloaded but can't be used from outside, so i think the same marking should be done as for private stuff. On the other hand maybe it would be nice to remove all markings for PHP5 ;-) Stephan1) "How should protected properties (variables) be marked?"Everything should be protected/private by default :) PHP5 is very nice (E_FATAL!) about letting you know when you attempt to violate access restrictions.a) no special indicators.2) "How should protected methods be marked?"a) no special indicators.