summaryrefslogtreecommitdiff
path: root/Zend/zend_object_handlers.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2003-07-07 10:53:27 +0000
committerZeev Suraski <zeev@php.net>2003-07-07 10:53:27 +0000
commit3cfa6a68f43a3d35dab133f2a3acbe45cc886fd6 (patch)
tree84b07b13a0fe044ba3586597bb391b1a286e1f72 /Zend/zend_object_handlers.c
parented97b9fb6e48ef655e3a9caf7d949cb167191c9f (diff)
downloadphp-git-3cfa6a68f43a3d35dab133f2a3acbe45cc886fd6.tar.gz
Add get_dim callback
Diffstat (limited to 'Zend/zend_object_handlers.c')
-rw-r--r--Zend/zend_object_handlers.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 2bee3d75a7..78aa8af692 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -335,11 +335,28 @@ static void zend_std_write_property(zval *object, zval *member, zval *value TSRM
}
}
+zval *zend_std_read_dimension(zval *object, zval *offset TSRMLS_DC)
+{
+#if 1
+ zend_error(E_ERROR, "Cannot use object as array");
+#else
+ zend_printf("Fetching from object: ");
+ zend_print_zval(object, 0);
+
+ zend_printf("\n the offset: ");
+ zend_print_zval(offset, 0);
+
+ zend_printf("\n");
+#endif
+ return EG(uninitialized_zval_ptr);
+}
+
static void zend_std_write_dimension(zval *object, zval *offset, zval *value TSRMLS_DC)
{
+#if 1
zend_error(E_ERROR, "Cannot use object as array");
-#if 0
+#else
zend_printf("Assigning to object: ");
zend_print_zval(object, 0);
@@ -348,9 +365,9 @@ static void zend_std_write_dimension(zval *object, zval *offset, zval *value TSR
zend_printf("\n the value: ");
zend_print_zval(value, 0);
-#endif
zend_printf("\n");
+#endif
}
@@ -835,6 +852,7 @@ zend_object_handlers std_object_handlers = {
zend_std_read_property, /* read_property */
zend_std_write_property, /* write_property */
+ zend_std_read_dimension, /* read_dimension */
zend_std_write_dimension, /* write_dimension */
zend_std_get_property_ptr, /* get_property_ptr */
zend_std_get_property_ptr, /* get_property_zval_ptr */