Re: Pear Configuration
| From: | Stig S. Bakken | Date: | Thu, 26 Jul 2001 21:08:11 +0000 |
| Subject: | Re: Pear Configuration | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-1075@lists.php.net to get a copy of this message | ||
yavor shahpasov wrote:
>
> I remember a discussion about putting PEAR configuration in php.ini. I'm
> tired of writing PEAR::setErrorHandling every time I start coding.
>
> Here are a few options.
> a) Each PEAR class has it's own config file (i.e. PEAR.ini) and it reads it
> on start, use PEAR::Config to write read
> b) All classes have one config file namely PEAR.ini with different sections
> for each class/package
> c) Use php.ini
>
> Ideas if using a or b
> *) make shell scripts / web interface for configuring PEAR
> *) Pear should provide methods to register an option getParam/setParam
> methods
> *) Configuration should be loaded/save with constructors/destructors
I usually use an auto_prepend file where I call
PEAR::setErrorHandling(). Although I don't think it's needed for
setting default error handlers, I think having a configuration system
for different components is a good idea.
- Stig