A question of style - Properties

From: Date: Thu, 26 Apr 2001 19:51:49 +0000
Subject: A question of style - Properties
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-328@lists.php.net to get a copy of this message
i've just finished the "domain-specific" code for a Pear extension written in C, and im at the point of creating a user-land PHP extension for it. i wanted to get some consensus on properties, particularly those which trigger actions in the underlying library. to be more specific, what style do you prefer : a) $an_object->property = $some_value; echo $an_object->property; b) $an_object->setProperty($some_value); echo $an_object->getProperty(); i think it shouldnt matter for readonly properties, or those with no "side-effects", but what about other cases ? _____________________________________ "Fried Ice-Cream is a reality !" - George Clinton

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