zend_class_entry.create_object
| From: | Brandon Fosdick | Date: | Wed, 03 May 2006 06:24:41 +0000 |
| Subject: | zend_class_entry.create_object | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-23105@lists.php.net to get a copy of this message | ||
When registering a new class, what are the consequences of setting zend_class_entry.create_object =
NULL? INIT_CLASS_ENTRY() defaults it to NULL, but the tutorial I'm looking at sets it to the
address of a function immediately afterwards.
My concern is that setting this allows the engine to call a constructor-like-function behind my
back. I'd rather handle such things while handling calls to new(). Is that possible? Is it even
a good idea?
The tutorial code provides a function for zend_class_entry.create_object that returns a populated
zend_object_value. Presumably that's a useful thing to do, and if I don't have a function
there I would need to find some other means of supplying the zend_object_value to the engine. Can I
do that in a new() handler? How?