Re: Sitegroup issue!

"Piotras" <pp-VVDi8QVAvoBWk0Htik3J/[email protected]> Tue, 7 Mar 2006 19:55:57 +0100 (CET)
Newsgroups gmane.comp.web.midgard.devel
Message-ID <[email protected]>
> Hi,

Hi,

>> Is it possible for php to define some properties as read only - so that
>> you at least can get a notice when trying to set the sitegroup?
>
> It would be possible if we defined the generic Zend getter and setter
> methods instead of copying property values back and forth from
> MgdSchema object properties to PHP object properties...

I can not agree here.

1. Zend setter and getter would be still generic one.
2. Zend1 has no support for read only properties.
3. You can not make one setter and getter for Zend1 and Zend2.
4. Zend2 is not primary aim *right now* to provide another setter and getter
functionality.
5. I do not trust resource handler used for object instances
( but I will trust one day ;)
6. Code like:

if($obj->prop)
    echo $obj->prop;

$obj->prop = $vale;
echo $obj->prop;
$obj->update();

will trigger 4 additional resource lookups.

7. Coming back to resource handler. Show me how many basic php extension uses
resources for external objects and how many of them uses more than 500 resource
handler per request. midgard-java extension is an exception but I do not think it's
widely used.

8. As long as we really do not need this I can not spend much time to debug php leaks.
This is resource handler or generic array issue IMO.

So as long we use Zend1 and Zend2 property setter and getter is not good thing IMO.

Piotras