21#define INCOMPLETE_CLASS_MSG \
22 "The script tried to %s on an incomplete object. " \
23 "Please ensure that the class definition \"%s\" of the object " \
24 "you are trying to operate on was loaded _before_ " \
25 "unserialize() gets called or provide an autoloader " \
26 "to load the class definition"
31static void incomplete_class_message(
zend_object *
object)
35 "access a property", class_name ?
ZSTR_VAL(class_name) :
"unknown");
41static void throw_incomplete_class_error(
zend_object *
object,
const char *what)
45 what, class_name ?
ZSTR_VAL(class_name) :
"unknown");
53 incomplete_class_message(
object);
59 return &
EG(uninitialized_zval);
66 throw_incomplete_class_error(
object,
"modify a property");
73 throw_incomplete_class_error(
object,
"modify a property");
74 return &
EG(error_zval);
80 throw_incomplete_class_error(
object,
"modify a property");
84static int incomplete_class_has_property(
zend_object *
object,
zend_string *member,
int check_empty,
void **cache_slot)
86 incomplete_class_message(
object);
93 throw_incomplete_class_error(*
object,
"call a method");
104 object->handlers = &php_incomplete_object_handlers;
114 php_incomplete_object_handlers.read_property = incomplete_class_get_property;
115 php_incomplete_object_handlers.has_property = incomplete_class_has_property;
116 php_incomplete_object_handlers.unset_property = incomplete_class_unset_property;
117 php_incomplete_object_handlers.write_property = incomplete_class_write_property;
118 php_incomplete_object_handlers.get_property_ptr_ptr = incomplete_class_get_property_ptr_ptr;
119 php_incomplete_object_handlers.get_method = incomplete_class_get_method;
PHPAPI zend_string * php_lookup_class_name(zend_object *object)
PHPAPI void php_register_incomplete_class_handlers(void)
PHPAPI void php_store_class_name(zval *object, zend_string *name)
#define INCOMPLETE_CLASS_MSG
PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format,...)
unsigned char key[REFLECTION_KEY_LEN]
ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const char *format,...)
ZEND_API void object_properties_init(zend_object *object, zend_class_entry *class_type)
zend_string_release_ex(func->internal_function.function_name, 0)
union _zend_function zend_function
ZEND_API zval *ZEND_FASTCALL zend_hash_str_find(const HashTable *ht, const char *str, size_t len)
ZEND_API zval *ZEND_FASTCALL zend_hash_str_update(HashTable *ht, const char *str, size_t len, zval *pData)
struct _zend_string zend_string
ZEND_API const zend_object_handlers std_object_handlers
ZEND_API zend_object *ZEND_FASTCALL zend_objects_new(zend_class_entry *ce)
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object
#define ZVAL_STR_COPY(z, s)
#define Z_OBJPROP_P(zval_p)
struct _zend_object_handlers zend_object_handlers