Re: MidgardConfig comments (Was: [midgard-dev] Automake and directories)

Piotras <pp-VVDi8QVAvoBWk0Htik3J/[email protected]> Sat, 18 Feb 2006 10:58:35 +0100
Newsgroups gmane.comp.web.midgard.devel
Message-ID <[email protected]>
Jukka Zitting <[email protected]> wrote:

> Hi,

Hi,
 
> 
> How about if we allowed both a name string and a full config object as
> alternative connection options. The preferred interface would be to
> use the higher level function with a database configuration name, but
> a config object could also be used to allow more flexibility for
> applications that need it:

Hold on with real specification for a while. What I need ( and why I want to 
have MidgardConfig  ) is:

midgard-apache&midgard-php only 

	1. Read vhost configuration and create MidgardConfig object instance
	This could be the only one member of dcfg structure.
	
	2. Make connection which uses dcfg->config

	3. "save" connection in connections pool

	4. Initialize request

	5. Set request's config

Probably I spend too much time with legacy code now and want to make things complicated a bit.
I am confused with current midgard *mgd usage.	But I wonder how to resolve vhost configuration vs 
request configuration. 

What should I do with:
	* person object instance created during request
	* loglevel set during request 
	* sitegroup
	* lang
	* probably logfile

?

Set it as midgard connection data or midgard config? Midgard connection should be completely unaware 
of such details IMO. And why Your proposal about GKeyFile is good I found it diffucult to use during request 
time and *only* during request time. That's why I think about MidgardConfig.

So probably dcfg ( rather rcfg ) structures could have two members , two MidgardConfig.
Real configuration pointer and pointer to config which is initialized only for request time.

I also wonder about midgard connection being able to be set as MidgardConfig property or member.
Probably I am wrong but I do not want to work with connection handler during request but I need to 
work with request config which can handle connection completely invisible even for me application 
developer.

I am thinking about Zend's RINIT and RSHUTDOWN macros. What should I initialize there? Connection 
and it configuration ( which requiers double useless work ) or configuration which can handle connection?

What should I free ( reset ) in RSHUTDOWON? Connection or request configuration?

And another question ;)
Should we have MidgardConnection object or just Midgard ?

Piotras