digitalnature / php-ref

A better alternative to print_r / var_dump
347 stars 59 forks source link

Persistent config #11

Closed igorsinkovec closed 11 years ago

igorsinkovec commented 11 years ago

I prefer php-ref over any other similar solution because it is simple to use, powerful and pretty.

Since I wanted my config to be persistent and done cleanly I refactored the code to support an external config file. I also included the config file, named refconfig.php. I am offering my changes to be merged with the master branch.

Thank you.

Igor

digitalnature commented 11 years ago

I don't really see the need for this. You could simply set your own configuration with ref::config() after you include the ref.php file. Or am I missing something here?

igorsinkovec commented 11 years ago

Hi mate,

Thanks for your reply.

To explain my situation: I have set the include path to ref.php in php.ini, so I don't have to include it explicitly in every project. To be able to set ref::config() I would have to create another file for configs and include that in php.ini, too. I didn't want to do that, for whatever reasons. It made more sense to me to add an option in ref class to look for a config file. I left the default config in ref to fall back to.

Anyway, thanks for ref. I use it extensively every day and it saves me lots of hassle.

Cheers mate!

Igor

On Thursday 05 of September 2013 11:47:22 digitalnature wrote:

I don't really see the need for this. You could simply set your own configuration with ref::config() after you include the ref.php file. Or am I missing something here? — Reply to this email directly or view it on GitHub.

igorsinkovec commented 11 years ago

Closed - removed.

digitalnature commented 9 years ago

config is read from php.ini now too, so that should solve the config persistance problem