David Guerizec wrote:

> there are three different cases:
> 
> 1. removing it, but with a big number of needed parameters, it could be
> bad for performance to get them with the method ->parameter()

On the other hand, there'd be no need to execute the parameter-loading
code
for each object get.

> 2. keeping it and get only those that are 'variable safe', but in this
> case also, with a big number of un-needed parameters, this is not really
> performant when getting only the object (mgd_get_object())

Plus I'd have to add code to determine what is safe.

> 3. create a new function that would fetch all the parameters (or all the
> parameters in a domain) in an associative array on-demand.
> 
> The third solution is feasible now with the $midgard->types["object"] as
> the first parameter of a generic function:
> mgd_get_parameters($midgard->types["article"], $id [, $domain]);

Why not a method on the object itself?

> or even:
> mgd_get_parameters($midgard->types[$obj->__table__], $obj->id [, $domain]);

I would vote against this. The __table__ parameter is for internal use
only
and is virtually guaranteed to be gone with Midgard 2.0.

Emile

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to