Jason Barnett wrote:
I have a class definition that has a lot of private properties. These properties don't need to change often, in fact a user could probably just change the values once and forget about most of them. So this makes me think that I should use parse_ini_file and a configuration file to let users "set and forget". But is this something the average PHPer would easily understand? Would it be better to just have all those options be parameters in the class constructor (with default values)?
I'd prefer the text file. It's easier to open that and change values plus they don't have to worry about PHP syntax as much. Haven't tried, but you should be able to import them as private variables for your class...
-- ---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php