Re: Proposal: File_Apache

From: Date: Sat, 13 Sep 2003 12:53:05 +0000
Subject: Re: Proposal: File_Apache
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-21467@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Alan Knowles, you wrote: > I'd expect File_Apache_* to modify httpd.conf... Hm, that's a matter of opinion... Hopwever ATM it seems to break the package into several ones, so I'll propose two new packages - File_HtGroup and File_HtPasswd - and will hopefully be able to provide some extending features to File_HtAccess. > php_opts array .. = loading this on demand from an ini file seems more > sensible... (mixing data/config with code seems a bit much here..) Hm, that seems to be a good point, I'll give it a try. > it would also benefit from being a static or global.. so > print_r($htaccess); would produce something logical.. Yes, I know what you mean. > this is a good example of where getters are generally absurd, but > setters, are quite essential.... > I'd suggest making them all public.. - it would make the class > considerably simpler to use... - remember.. - 90% of users use 10% of > the features.. so you dont want to make them learn 100% of the methods > before they can use it... a quick parse/print_r() is what I suspect > alot of users would use it for... - more advanced users could then > workout that there are setters for everything.. Hm, I don't really agree here. The class relies on the content of the private vars so using setters and getters for accessing them is the only way to provide some straightness and to prevent misuse. > case 'AUTHTYPE' : > case 'AUTHNAME' : > case 'AUTHUSERFILE' : > case 'AUTHGROUPFILE' : > $this->{'set'.$comm}($args); > break; That's also a good thing(tm) :) > Regards > Alan Thanks, Michael -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (Cygwin) iD8DBQE/YxMw3645gzRPvy8RAiI0AJ9JWoZGBJdZ8B6HMUPPFtLzI6JUHQCeKQNN SF9adiGGZ9OlaO97xGykrPw= =X6Bx -----END PGP SIGNATURE-----

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