mirror of
https://github.com/php/php-src.git
synced 2024-09-23 02:47:26 +00:00
Implement get callback for SimpleXML (it now supports pre/post increment
as well as binary-assign-ops)
This commit is contained in:
parent
439396188c
commit
e8e9b2afee
@ -1013,6 +1013,21 @@ sxe_object_cast(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_
|
|||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
static zval *sxe_get_value(zval *z TSRMLS_DC)
|
||||||
|
{
|
||||||
|
zval *retval;
|
||||||
|
|
||||||
|
MAKE_STD_ZVAL(retval);
|
||||||
|
|
||||||
|
if (sxe_object_cast(z, retval, IS_STRING, 0 TSRMLS_CC)==FAILURE) {
|
||||||
|
zend_error(E_ERROR, "Unable to cast node to string");
|
||||||
|
}
|
||||||
|
|
||||||
|
retval->refcount = 0;
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static zend_object_handlers sxe_object_handlers = {
|
static zend_object_handlers sxe_object_handlers = {
|
||||||
ZEND_OBJECTS_STORE_HANDLERS,
|
ZEND_OBJECTS_STORE_HANDLERS,
|
||||||
sxe_property_read,
|
sxe_property_read,
|
||||||
@ -1020,7 +1035,7 @@ static zend_object_handlers sxe_object_handlers = {
|
|||||||
sxe_dimension_read,
|
sxe_dimension_read,
|
||||||
sxe_dimension_write,
|
sxe_dimension_write,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
sxe_get_value, /* get */
|
||||||
NULL,
|
NULL,
|
||||||
sxe_property_exists,
|
sxe_property_exists,
|
||||||
sxe_property_delete,
|
sxe_property_delete,
|
||||||
|
Loading…
Reference in New Issue
Block a user