Re: overprotective?

From: Date: Wed, 06 Apr 2005 14:27:22 +0000
Subject: Re: overprotective?
References: 1 2 3 4 5 6  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-37115@lists.php.net to get a copy of this message
Philippe Jausions wrote:
AFAIK external calls to objects stored in members is not good design, ss your example demonstrates clearly... Also, if a method is marked
No, this is perfectly valid design in PHP when you are trying to cut down code size used for common task. However you obiously need to drop the "private" or "protected" visibility in favor of "public" (and simply mark it as "package" visibility in a comment).
private, it is to prevent wrappers to access it. Private method should really be used with caution but they are usefull to do the dirty work that could be at risk if an extended class interefered with it.
yes .. and my point is that we are using private in alot of places where we even plan to have code extend. This is the case in tons of packages that implement different drivers/containers. regards, Lukas

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