summaryrefslogtreecommitdiff
path: root/Zend/OBJECTS2_HOWTO
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2002-03-14 17:08:06 +0000
committerStanislav Malyshev <stas@php.net>2002-03-14 17:08:06 +0000
commit929bdc69980bfd25779371dd95ee51756d9ef283 (patch)
tree05d956bfd82314becd1149ca7c45106a484d984a /Zend/OBJECTS2_HOWTO
parentcf4a292c5da9da2fef77b8ae71380eadf26c4286 (diff)
downloadphp-git-929bdc69980bfd25779371dd95ee51756d9ef283.tar.gz
Update howto
Diffstat (limited to 'Zend/OBJECTS2_HOWTO')
-rw-r--r--Zend/OBJECTS2_HOWTO16
1 files changed, 13 insertions, 3 deletions
diff --git a/Zend/OBJECTS2_HOWTO b/Zend/OBJECTS2_HOWTO
index 9a0222e313..4e627c1eeb 100644
--- a/Zend/OBJECTS2_HOWTO
+++ b/Zend/OBJECTS2_HOWTO
@@ -48,13 +48,19 @@ Object access - write
---------------------
write_property is used to directly write object's property by
-name. This handler is not oftenly used by the engine itself, but may
-be used by some internal functions.
+name. This handler is used to assign property variables or to change them
+in operations like += or ++ (unless get_property_zval_ptr is also set).
+
+get_property_zval_ptr is used to obtain pointer to modifyable zval for
+operations like += or ++. This should be used only if your object model
+stores properties as real zval's that can be modified from outside.
+Otherwise this handler should be NULL and the engine will use
+read_property and write_property instead.
get_property_ptr is used to obtain zval ** for future writing to
it. If your object properties are stored as zval*, return real place
where the property is stored. If the aren't, the best way is to create
-proxy object and handle it via get and set methods (see below).
+proxy object and handle it via get and set methods (see below).
get and set handlers are used when engine needs to access the object
as a value. E.g., in the following situation:
@@ -117,6 +123,7 @@ typedef struct _zend_object_handlers {
zend_object_read_property_t read_property;
zend_object_write_property_t write_property;
zend_object_get_property_ptr_t get_property_ptr;
+ zend_object_get_property_zval_ptr_t get_property_zval_ptr;
zend_object_get_t get;
zend_object_set_t set;
zend_object_has_property_t has_property;
@@ -149,6 +156,9 @@ reading.
write_property - assigns value to certain property of the object.
+get_property_zval_ptr - retrieves zval** for being directly modified by
+the engine. If your properties are not zval's, don't define it.
+
get_property_ptr - retrieves zval** for the property of the value, to
be used for read and write. If object properties are not zval's
natively, this method should create and return proxy object for use