Re: [PHP-DEV] Follow the object constructor chain ... options

2005-10-29 Thread Marcus Boerger
Boerger [mailto:[EMAIL PROTECTED] >> Sent: Saturday, October 29, 2005 3:58 AM >> To: Bob Silva >> Cc: internals@lists.php.net >> Subject: Re: [PHP-DEV] Follow the object constructor chain ... options >> >> Hello Bob, >> >> why so complex and pote

RE: [PHP-DEV] Follow the object constructor chain ... options

2005-10-29 Thread Bob Silva
> Sent: Saturday, October 29, 2005 3:58 AM > To: Bob Silva > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] Follow the object constructor chain ... options > > Hello Bob, > > why so complex and potential wrong? > > zend_class_entry *ce = Z_OBJ_CE(object); >

Re: [PHP-DEV] Follow the object constructor chain ... options

2005-10-29 Thread Marcus Boerger
Hello Bob, why so complex and potential wrong? zend_class_entry *ce = Z_OBJ_CE(object); zend_function*ctor = ce->parent ? ce->parent->constructor : NULL; if (ctor && ctor->common.fn_flags & ZEND_ACC_PUBLIC) { zend_call_method_with_0_params(object, ce, ctor, "__construct", NULL); } btw,

RE: [PHP-DEV] Follow the object constructor chain ... options

2005-10-29 Thread Bob Silva
I believe I have it working. Anyone see any blatant problems with this? Also, would it make sense to have this functionality in the engine itself? Seeing as that internal classes have inheritance capabilities, it seems logical to have the functionality to call a parent constructor within the engine