2006-05-10 07:53:23 +08:00
|
|
|
/*
|
2003-02-01 09:49:15 +08:00
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
| Zend Engine |
|
|
|
|
+----------------------------------------------------------------------+
|
2007-12-31 15:17:19 +08:00
|
|
|
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
2003-02-01 09:49:15 +08:00
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
| This source file is subject to version 2.00 of the Zend license, |
|
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
2003-06-11 04:04:29 +08:00
|
|
|
| available through the world-wide-web at the following url: |
|
2003-02-01 09:49:15 +08:00
|
|
|
| http://www.zend.com/license/2_00.txt. |
|
|
|
|
| If you did not receive a copy of the Zend license and are unable to |
|
|
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
|
|
| license@zend.com so we can mail you a copy immediately. |
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
| Authors: Andi Gutmans <andi@zend.com> |
|
|
|
|
| Zeev Suraski <zeev@zend.com> |
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
2002-05-31 20:09:19 +08:00
|
|
|
#include "zend.h"
|
|
|
|
#include "zend_globals.h"
|
|
|
|
#include "zend_variables.h"
|
|
|
|
#include "zend_API.h"
|
|
|
|
#include "zend_objects_API.h"
|
|
|
|
|
|
|
|
#define ZEND_DEBUG_OBJECTS 0
|
|
|
|
|
2002-08-09 01:53:32 +08:00
|
|
|
ZEND_API void zend_objects_store_init(zend_objects_store *objects, zend_uint init_size)
|
2002-05-31 20:09:19 +08:00
|
|
|
{
|
2002-06-15 16:47:11 +08:00
|
|
|
objects->object_buckets = (zend_object_store_bucket *) emalloc(init_size * sizeof(zend_object_store_bucket));
|
2002-05-31 20:09:19 +08:00
|
|
|
objects->top = 1; /* Skip 0 so that handles are true */
|
|
|
|
objects->size = init_size;
|
|
|
|
objects->free_list_head = -1;
|
2006-03-29 05:58:01 +08:00
|
|
|
memset(&objects->object_buckets[0], 0, sizeof(zend_object_store_bucket));
|
2002-05-31 20:09:19 +08:00
|
|
|
}
|
|
|
|
|
2002-08-09 01:53:32 +08:00
|
|
|
ZEND_API void zend_objects_store_destroy(zend_objects_store *objects)
|
2002-05-31 20:09:19 +08:00
|
|
|
{
|
|
|
|
efree(objects->object_buckets);
|
2005-09-28 02:07:41 +08:00
|
|
|
objects->object_buckets = NULL;
|
2002-05-31 20:09:19 +08:00
|
|
|
}
|
|
|
|
|
2002-08-09 01:53:32 +08:00
|
|
|
ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TSRMLS_DC)
|
2002-05-31 20:09:19 +08:00
|
|
|
{
|
|
|
|
zend_uint i = 1;
|
|
|
|
|
|
|
|
for (i = 1; i < objects->top ; i++) {
|
2004-02-04 20:30:48 +08:00
|
|
|
if (objects->object_buckets[i].valid) {
|
|
|
|
struct _store_object *obj = &objects->object_buckets[i].bucket.obj;
|
|
|
|
|
2004-05-24 04:33:09 +08:00
|
|
|
if (!objects->object_buckets[i].destructor_called) {
|
|
|
|
objects->object_buckets[i].destructor_called = 1;
|
2005-10-10 22:31:12 +08:00
|
|
|
if (obj->dtor && obj->object) {
|
2006-01-16 18:12:36 +08:00
|
|
|
obj->refcount++;
|
2004-05-24 04:33:09 +08:00
|
|
|
obj->dtor(obj->object, i TSRMLS_CC);
|
2006-01-16 18:12:36 +08:00
|
|
|
obj->refcount--;
|
2004-05-24 04:33:09 +08:00
|
|
|
}
|
2004-02-04 20:17:57 +08:00
|
|
|
}
|
2002-05-31 20:09:19 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-09-17 18:13:52 +08:00
|
|
|
ZEND_API void zend_objects_store_mark_destructed(zend_objects_store *objects TSRMLS_DC)
|
|
|
|
{
|
2006-11-23 16:07:05 +08:00
|
|
|
zend_uint i;
|
2004-09-17 18:13:52 +08:00
|
|
|
|
2006-11-23 16:07:05 +08:00
|
|
|
if (!objects->object_buckets) {
|
|
|
|
return;
|
|
|
|
}
|
2004-09-17 18:13:52 +08:00
|
|
|
for (i = 1; i < objects->top ; i++) {
|
|
|
|
if (objects->object_buckets[i].valid) {
|
|
|
|
objects->object_buckets[i].destructor_called = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2004-02-03 23:37:37 +08:00
|
|
|
|
2004-02-04 17:56:20 +08:00
|
|
|
ZEND_API void zend_objects_store_free_object_storage(zend_objects_store *objects TSRMLS_DC)
|
2004-02-03 23:37:37 +08:00
|
|
|
{
|
2004-02-04 17:56:20 +08:00
|
|
|
zend_uint i = 1;
|
|
|
|
|
|
|
|
for (i = 1; i < objects->top ; i++) {
|
2004-02-04 20:30:48 +08:00
|
|
|
if (objects->object_buckets[i].valid) {
|
|
|
|
struct _store_object *obj = &objects->object_buckets[i].bucket.obj;
|
|
|
|
|
2004-03-11 21:27:18 +08:00
|
|
|
objects->object_buckets[i].valid = 0;
|
2004-02-04 20:30:48 +08:00
|
|
|
if (obj->free_storage) {
|
|
|
|
obj->free_storage(obj->object TSRMLS_CC);
|
|
|
|
}
|
2004-03-11 21:40:19 +08:00
|
|
|
/* Not adding to free list as we are shutting down anyway */
|
2004-02-04 17:56:20 +08:00
|
|
|
}
|
|
|
|
}
|
2004-02-03 23:37:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-05-31 20:09:19 +08:00
|
|
|
/* Store objects API */
|
|
|
|
|
2004-02-04 17:56:20 +08:00
|
|
|
ZEND_API zend_object_handle zend_objects_store_put(void *object, zend_objects_store_dtor_t dtor, zend_objects_free_object_storage_t free_storage, zend_objects_store_clone_t clone TSRMLS_DC)
|
2002-05-31 20:09:19 +08:00
|
|
|
{
|
|
|
|
zend_object_handle handle;
|
|
|
|
struct _store_object *obj;
|
2006-05-10 07:53:23 +08:00
|
|
|
|
2002-05-31 20:09:19 +08:00
|
|
|
if (EG(objects_store).free_list_head != -1) {
|
|
|
|
handle = EG(objects_store).free_list_head;
|
|
|
|
EG(objects_store).free_list_head = EG(objects_store).object_buckets[handle].bucket.free_list.next;
|
|
|
|
} else {
|
|
|
|
if (EG(objects_store).top == EG(objects_store).size) {
|
|
|
|
EG(objects_store).size <<= 1;
|
|
|
|
EG(objects_store).object_buckets = (zend_object_store_bucket *) erealloc(EG(objects_store).object_buckets, EG(objects_store).size * sizeof(zend_object_store_bucket));
|
|
|
|
}
|
|
|
|
handle = EG(objects_store).top++;
|
|
|
|
}
|
|
|
|
obj = &EG(objects_store).object_buckets[handle].bucket.obj;
|
|
|
|
EG(objects_store).object_buckets[handle].destructor_called = 0;
|
2004-02-04 20:30:48 +08:00
|
|
|
EG(objects_store).object_buckets[handle].valid = 1;
|
2002-05-31 20:09:19 +08:00
|
|
|
|
|
|
|
obj->refcount = 1;
|
|
|
|
obj->object = object;
|
2005-11-15 20:41:31 +08:00
|
|
|
obj->dtor = dtor?dtor:(zend_objects_store_dtor_t)zend_objects_destroy_object;
|
2004-02-04 17:56:20 +08:00
|
|
|
obj->free_storage = free_storage;
|
2004-02-04 20:30:48 +08:00
|
|
|
|
2002-05-31 20:09:19 +08:00
|
|
|
obj->clone = clone;
|
|
|
|
|
|
|
|
#if ZEND_DEBUG_OBJECTS
|
|
|
|
fprintf(stderr, "Allocated object id #%d\n", handle);
|
|
|
|
#endif
|
|
|
|
return handle;
|
|
|
|
}
|
|
|
|
|
2006-08-07 23:15:22 +08:00
|
|
|
ZEND_API zend_uint zend_objects_store_get_refcount(zval *object TSRMLS_DC)
|
|
|
|
{
|
|
|
|
zend_object_handle handle = Z_OBJ_HANDLE_P(object);
|
|
|
|
|
|
|
|
return EG(objects_store).object_buckets[handle].bucket.obj.refcount;
|
|
|
|
}
|
|
|
|
|
2002-08-09 01:53:32 +08:00
|
|
|
ZEND_API void zend_objects_store_add_ref(zval *object TSRMLS_DC)
|
2002-05-31 20:09:19 +08:00
|
|
|
{
|
|
|
|
zend_object_handle handle = Z_OBJ_HANDLE_P(object);
|
|
|
|
|
|
|
|
EG(objects_store).object_buckets[handle].bucket.obj.refcount++;
|
|
|
|
#if ZEND_DEBUG_OBJECTS
|
|
|
|
fprintf(stderr, "Increased refcount of object id #%d\n", handle);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2006-05-10 07:53:23 +08:00
|
|
|
/*
|
|
|
|
* Add a reference to an objects store entry given the object handle.
|
|
|
|
*/
|
|
|
|
ZEND_API void zend_objects_store_add_ref_by_handle(zend_object_handle handle TSRMLS_DC)
|
|
|
|
{
|
|
|
|
EG(objects_store).object_buckets[handle].bucket.obj.refcount++;
|
|
|
|
}
|
|
|
|
|
2004-02-04 20:30:48 +08:00
|
|
|
#define ZEND_OBJECTS_STORE_ADD_TO_FREE_LIST() \
|
2002-05-31 20:09:19 +08:00
|
|
|
EG(objects_store).object_buckets[handle].bucket.free_list.next = EG(objects_store).free_list_head; \
|
2004-02-04 20:30:48 +08:00
|
|
|
EG(objects_store).free_list_head = handle; \
|
|
|
|
EG(objects_store).object_buckets[handle].valid = 0;
|
2002-05-31 20:09:19 +08:00
|
|
|
|
2002-08-09 01:53:32 +08:00
|
|
|
ZEND_API void zend_objects_store_del_ref(zval *zobject TSRMLS_DC)
|
2002-05-31 20:09:19 +08:00
|
|
|
{
|
2005-09-28 02:07:41 +08:00
|
|
|
zend_object_handle handle;
|
2006-05-10 07:53:23 +08:00
|
|
|
|
|
|
|
handle = Z_OBJ_HANDLE_P(zobject);
|
|
|
|
|
2007-10-07 13:22:07 +08:00
|
|
|
Z_ADDREF_P(zobject);
|
2006-05-10 07:53:23 +08:00
|
|
|
zend_objects_store_del_ref_by_handle(handle TSRMLS_CC);
|
2007-10-07 13:22:07 +08:00
|
|
|
Z_DELREF_P(zobject);
|
2006-05-10 07:53:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Delete a reference to an objects store entry given the object handle.
|
|
|
|
*/
|
|
|
|
ZEND_API void zend_objects_store_del_ref_by_handle(zend_object_handle handle TSRMLS_DC)
|
|
|
|
{
|
2005-09-28 02:07:41 +08:00
|
|
|
struct _store_object *obj;
|
2006-05-31 20:59:31 +08:00
|
|
|
int failure = 0;
|
2005-09-28 02:07:41 +08:00
|
|
|
|
|
|
|
if (!EG(objects_store).object_buckets) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
obj = &EG(objects_store).object_buckets[handle].bucket.obj;
|
|
|
|
|
2004-03-11 21:40:19 +08:00
|
|
|
/* Make sure we hold a reference count during the destructor call
|
|
|
|
otherwise, when the destructor ends the storage might be freed
|
|
|
|
when the refcount reaches 0 a second time
|
2006-05-10 07:53:23 +08:00
|
|
|
*/
|
2004-03-11 21:40:19 +08:00
|
|
|
if (EG(objects_store).object_buckets[handle].valid) {
|
2004-03-03 17:58:58 +08:00
|
|
|
if (obj->refcount == 1) {
|
2004-03-11 21:40:19 +08:00
|
|
|
if (!EG(objects_store).object_buckets[handle].destructor_called) {
|
|
|
|
EG(objects_store).object_buckets[handle].destructor_called = 1;
|
|
|
|
|
|
|
|
if (obj->dtor) {
|
2006-05-31 20:59:31 +08:00
|
|
|
zend_try {
|
|
|
|
obj->dtor(obj->object, handle TSRMLS_CC);
|
|
|
|
} zend_catch {
|
|
|
|
failure = 1;
|
|
|
|
} zend_end_try();
|
2004-03-11 21:40:19 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (obj->refcount == 1) {
|
|
|
|
if (obj->free_storage) {
|
2006-05-31 20:59:31 +08:00
|
|
|
zend_try {
|
|
|
|
obj->free_storage(obj->object TSRMLS_CC);
|
|
|
|
} zend_catch {
|
|
|
|
failure = 1;
|
|
|
|
} zend_end_try();
|
2004-03-11 21:40:19 +08:00
|
|
|
}
|
|
|
|
ZEND_OBJECTS_STORE_ADD_TO_FREE_LIST();
|
2004-02-26 05:39:59 +08:00
|
|
|
}
|
2004-02-25 16:16:54 +08:00
|
|
|
}
|
2002-05-31 20:09:19 +08:00
|
|
|
}
|
2004-03-11 21:40:19 +08:00
|
|
|
|
2004-03-03 17:58:58 +08:00
|
|
|
obj->refcount--;
|
|
|
|
|
2002-05-31 20:09:19 +08:00
|
|
|
#if ZEND_DEBUG_OBJECTS
|
2004-02-26 05:39:59 +08:00
|
|
|
if (obj->refcount == 0) {
|
|
|
|
fprintf(stderr, "Deallocated object id #%d\n", handle);
|
|
|
|
} else {
|
2002-05-31 20:09:19 +08:00
|
|
|
fprintf(stderr, "Decreased refcount of object id #%d\n", handle);
|
|
|
|
}
|
|
|
|
#endif
|
2006-05-31 20:59:31 +08:00
|
|
|
if (failure) {
|
|
|
|
zend_bailout();
|
|
|
|
}
|
2002-05-31 20:09:19 +08:00
|
|
|
}
|
|
|
|
|
2002-08-09 01:53:32 +08:00
|
|
|
ZEND_API zend_object_value zend_objects_store_clone_obj(zval *zobject TSRMLS_DC)
|
2002-05-31 20:09:19 +08:00
|
|
|
{
|
|
|
|
zend_object_value retval;
|
|
|
|
void *new_object;
|
|
|
|
struct _store_object *obj;
|
|
|
|
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
|
|
|
|
|
|
|
|
obj = &EG(objects_store).object_buckets[handle].bucket.obj;
|
2006-05-10 07:53:23 +08:00
|
|
|
|
2002-09-15 15:45:26 +08:00
|
|
|
if (obj->clone == NULL) {
|
2003-07-21 01:50:23 +08:00
|
|
|
zend_error(E_CORE_ERROR, "Trying to clone uncloneable object of class %s", Z_OBJCE_P(zobject)->name);
|
2006-05-10 07:53:23 +08:00
|
|
|
}
|
2002-05-31 20:09:19 +08:00
|
|
|
|
2003-01-21 08:00:38 +08:00
|
|
|
obj->clone(obj->object, &new_object TSRMLS_CC);
|
2002-05-31 20:09:19 +08:00
|
|
|
|
2004-02-04 17:56:20 +08:00
|
|
|
retval.handle = zend_objects_store_put(new_object, obj->dtor, obj->free_storage, obj->clone TSRMLS_CC);
|
2002-05-31 20:09:19 +08:00
|
|
|
retval.handlers = Z_OBJ_HT_P(zobject);
|
2006-05-10 07:53:23 +08:00
|
|
|
|
2002-05-31 20:09:19 +08:00
|
|
|
return retval;
|
|
|
|
}
|
|
|
|
|
2002-08-09 01:53:32 +08:00
|
|
|
ZEND_API void *zend_object_store_get_object(zval *zobject TSRMLS_DC)
|
2002-05-31 20:09:19 +08:00
|
|
|
{
|
|
|
|
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
|
|
|
|
|
|
|
|
return EG(objects_store).object_buckets[handle].bucket.obj.object;
|
|
|
|
}
|
|
|
|
|
2006-05-10 07:53:23 +08:00
|
|
|
/*
|
|
|
|
* Retrieve an entry from the objects store given the object handle.
|
|
|
|
*/
|
|
|
|
ZEND_API void *zend_object_store_get_object_by_handle(zend_object_handle handle TSRMLS_DC)
|
|
|
|
{
|
|
|
|
return EG(objects_store).object_buckets[handle].bucket.obj.object;
|
|
|
|
}
|
|
|
|
|
2004-05-17 19:27:16 +08:00
|
|
|
/* zend_object_store_set_object:
|
|
|
|
* It is ONLY valid to call this function from within the constructor of an
|
|
|
|
* overloaded object. Its purpose is to set the object pointer for the object
|
|
|
|
* when you can't possibly know its value until you have parsed the arguments
|
|
|
|
* from the constructor function. You MUST NOT use this function for any other
|
|
|
|
* weird games, or call it at any other time after the object is constructed.
|
|
|
|
* */
|
|
|
|
ZEND_API void zend_object_store_set_object(zval *zobject, void *object TSRMLS_DC)
|
|
|
|
{
|
|
|
|
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
|
|
|
|
|
|
|
|
EG(objects_store).object_buckets[handle].bucket.obj.object = object;
|
|
|
|
}
|
|
|
|
|
2002-05-31 20:09:19 +08:00
|
|
|
|
2004-07-26 01:25:44 +08:00
|
|
|
/* Called when the ctor was terminated by an exception */
|
|
|
|
ZEND_API void zend_object_store_ctor_failed(zval *zobject TSRMLS_DC)
|
|
|
|
{
|
|
|
|
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
|
|
|
|
|
|
|
|
EG(objects_store).object_buckets[handle].destructor_called = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-05-31 20:09:19 +08:00
|
|
|
/* Proxy objects workings */
|
|
|
|
typedef struct _zend_proxy_object {
|
|
|
|
zval *object;
|
|
|
|
zval *property;
|
|
|
|
} zend_proxy_object;
|
|
|
|
|
|
|
|
static zend_object_handlers zend_object_proxy_handlers;
|
|
|
|
|
2004-02-04 17:56:20 +08:00
|
|
|
ZEND_API void zend_objects_proxy_free_storage(zend_proxy_object *object TSRMLS_DC)
|
2002-05-31 20:09:19 +08:00
|
|
|
{
|
|
|
|
zval_ptr_dtor(&object->object);
|
|
|
|
zval_ptr_dtor(&object->property);
|
|
|
|
efree(object);
|
|
|
|
}
|
|
|
|
|
2002-08-09 01:53:32 +08:00
|
|
|
ZEND_API void zend_objects_proxy_clone(zend_proxy_object *object, zend_proxy_object **object_clone TSRMLS_DC)
|
2002-05-31 20:09:19 +08:00
|
|
|
{
|
|
|
|
*object_clone = emalloc(sizeof(zend_proxy_object));
|
|
|
|
(*object_clone)->object = object->object;
|
|
|
|
(*object_clone)->property = object->property;
|
|
|
|
zval_add_ref(&(*object_clone)->property);
|
|
|
|
zval_add_ref(&(*object_clone)->object);
|
|
|
|
}
|
|
|
|
|
2004-03-22 02:27:58 +08:00
|
|
|
ZEND_API zval *zend_object_create_proxy(zval *object, zval *member TSRMLS_DC)
|
2002-05-31 20:09:19 +08:00
|
|
|
{
|
|
|
|
zend_proxy_object *pobj = emalloc(sizeof(zend_proxy_object));
|
2004-04-05 02:28:59 +08:00
|
|
|
zval *retval;
|
2002-05-31 20:09:19 +08:00
|
|
|
|
|
|
|
pobj->object = object;
|
|
|
|
pobj->property = member;
|
|
|
|
zval_add_ref(&pobj->property);
|
|
|
|
zval_add_ref(&pobj->object);
|
|
|
|
|
|
|
|
MAKE_STD_ZVAL(retval);
|
2006-05-10 07:53:23 +08:00
|
|
|
Z_TYPE_P(retval) = IS_OBJECT;
|
2004-02-04 20:17:57 +08:00
|
|
|
Z_OBJ_HANDLE_P(retval) = zend_objects_store_put(pobj, NULL, (zend_objects_free_object_storage_t) zend_objects_proxy_free_storage, (zend_objects_store_clone_t) zend_objects_proxy_clone TSRMLS_CC);
|
2002-05-31 20:09:19 +08:00
|
|
|
Z_OBJ_HT_P(retval) = &zend_object_proxy_handlers;
|
2006-05-10 07:53:23 +08:00
|
|
|
|
2004-03-22 02:27:58 +08:00
|
|
|
return retval;
|
2002-05-31 20:09:19 +08:00
|
|
|
}
|
|
|
|
|
2002-08-09 01:53:32 +08:00
|
|
|
ZEND_API void zend_object_proxy_set(zval **property, zval *value TSRMLS_DC)
|
2002-05-31 20:09:19 +08:00
|
|
|
{
|
|
|
|
zend_proxy_object *probj = zend_object_store_get_object(*property TSRMLS_CC);
|
|
|
|
|
2002-09-15 15:45:26 +08:00
|
|
|
if (Z_OBJ_HT_P(probj->object) && Z_OBJ_HT_P(probj->object)->write_property) {
|
2002-05-31 20:09:19 +08:00
|
|
|
Z_OBJ_HT_P(probj->object)->write_property(probj->object, probj->property, value TSRMLS_CC);
|
|
|
|
} else {
|
|
|
|
zend_error(E_WARNING, "Cannot write property of object - no write handler defined");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-08-09 01:53:32 +08:00
|
|
|
ZEND_API zval* zend_object_proxy_get(zval *property TSRMLS_DC)
|
2002-05-31 20:09:19 +08:00
|
|
|
{
|
|
|
|
zend_proxy_object *probj = zend_object_store_get_object(property TSRMLS_CC);
|
|
|
|
|
2002-09-15 15:45:26 +08:00
|
|
|
if (Z_OBJ_HT_P(probj->object) && Z_OBJ_HT_P(probj->object)->read_property) {
|
2004-03-22 02:21:46 +08:00
|
|
|
return Z_OBJ_HT_P(probj->object)->read_property(probj->object, probj->property, BP_VAR_R TSRMLS_CC);
|
2002-05-31 20:09:19 +08:00
|
|
|
} else {
|
|
|
|
zend_error(E_WARNING, "Cannot read property of object - no read handler defined");
|
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2007-07-21 08:35:15 +08:00
|
|
|
ZEND_API zend_object_handlers *zend_get_std_object_handlers(void)
|
2003-01-18 05:16:12 +08:00
|
|
|
{
|
|
|
|
return &std_object_handlers;
|
|
|
|
}
|
|
|
|
|
2002-05-31 20:09:19 +08:00
|
|
|
static zend_object_handlers zend_object_proxy_handlers = {
|
|
|
|
ZEND_OBJECTS_STORE_HANDLERS,
|
2006-05-10 07:53:23 +08:00
|
|
|
|
2003-07-07 17:08:33 +08:00
|
|
|
NULL, /* read_property */
|
|
|
|
NULL, /* write_property */
|
2003-07-07 18:53:27 +08:00
|
|
|
NULL, /* read dimension */
|
2003-07-07 17:08:33 +08:00
|
|
|
NULL, /* write_dimension */
|
2003-10-05 15:52:28 +08:00
|
|
|
NULL, /* get_property_ptr_ptr */
|
2003-07-07 17:08:33 +08:00
|
|
|
zend_object_proxy_get, /* get */
|
|
|
|
zend_object_proxy_set, /* set */
|
|
|
|
NULL, /* has_property */
|
|
|
|
NULL, /* unset_property */
|
2003-11-11 00:14:44 +08:00
|
|
|
NULL, /* has_dimension */
|
|
|
|
NULL, /* unset_dimension */
|
2003-07-07 17:08:33 +08:00
|
|
|
NULL, /* get_properties */
|
|
|
|
NULL, /* get_method */
|
|
|
|
NULL, /* call_method */
|
|
|
|
NULL, /* get_constructor */
|
|
|
|
NULL, /* get_class_entry */
|
|
|
|
NULL, /* get_class_name */
|
2003-08-13 15:17:16 +08:00
|
|
|
NULL, /* compare_objects */
|
|
|
|
NULL, /* cast_object */
|
2004-05-04 23:03:28 +08:00
|
|
|
NULL, /* count_elements */
|
2002-05-31 20:09:19 +08:00
|
|
|
};
|
2003-02-01 09:49:15 +08:00
|
|
|
|
2003-07-07 17:08:33 +08:00
|
|
|
|
2003-02-01 09:49:15 +08:00
|
|
|
/*
|
|
|
|
* Local variables:
|
|
|
|
* tab-width: 4
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* indent-tabs-mode: t
|
|
|
|
* End:
|
|
|
|
*/
|