Lines Matching refs:ce

77 		zend_class_entry *ce = zobj->ce;  in rebuild_object_properties()  local
80 zend_hash_init(zobj->properties, ce->default_properties_count, NULL, ZVAL_PTR_DTOR, 0); in rebuild_object_properties()
81 if (ce->default_properties_count) { in rebuild_object_properties()
84 ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop_info) { in rebuild_object_properties()
96 while (ce->parent && ce->parent->default_properties_count) { in rebuild_object_properties()
97 ce = ce->parent; in rebuild_object_properties()
98 ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop_info) { in rebuild_object_properties()
99 if (prop_info->ce == ce && in rebuild_object_properties()
149 *n = zobj->ce->default_properties_count; in zend_std_get_gc()
158 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_get_debug_info() local
162 if (!ce->__debugInfo) { in zend_std_get_debug_info()
169 zend_call_method_with_0_params(object, ce, &ce->__debugInfo, ZEND_DEBUGINFO_FUNC_NAME, &retval); in zend_std_get_debug_info()
198 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_call_getter() local
208 zend_call_method_with_1_params(object, ce, &ce->__get, ZEND_GET_FUNC_NAME, retval, member); in zend_std_call_getter()
216 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_call_setter() local
225 zend_call_method_with_2_params(object, ce, &ce->__set, ZEND_SET_FUNC_NAME, NULL, member, value); in zend_std_call_setter()
233 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_call_unsetter() local
244 zend_call_method_with_1_params(object, ce, &ce->__unset, ZEND_UNSET_FUNC_NAME, NULL, member); in zend_std_call_unsetter()
254 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_call_issetter() local
267 zend_call_method_with_1_params(object, ce, &ce->__isset, ZEND_ISSET_FUNC_NAME, retval, member); in zend_std_call_issetter()
275 … int zend_verify_property_access(zend_property_info *property_info, zend_class_entry *ce) /* {{{ */ in zend_verify_property_access() argument
287 return (ce == scope || property_info->ce == scope); in zend_verify_property_access()
294 return zend_check_protected(property_info->ce, scope); in zend_verify_property_access()
314 static zend_always_inline uint32_t zend_get_property_offset(zend_class_entry *ce, zend_string *memb… in zend_get_property_offset() argument
321 if (cache_slot && EXPECTED(ce == CACHED_PTR_EX(cache_slot))) { in zend_get_property_offset()
332 if (UNEXPECTED(zend_hash_num_elements(&ce->properties_info) == 0)) { in zend_get_property_offset()
336 zv = zend_hash_find(&ce->properties_info, member); in zend_get_property_offset()
344 if (EXPECTED(zend_verify_property_access(property_info, ce) != 0)) { in zend_get_property_offset()
349 …zend_error(E_NOTICE, "Accessing static property %s::$%s as non static", ZSTR_VAL(ce->name), ZSTR_V… in zend_get_property_offset()
368 if (scope != ce in zend_get_property_offset()
370 && is_derived_class(ce, scope) in zend_get_property_offset()
380 CACHE_POLYMORPHIC_PTR_EX(cache_slot, ce, (void*)(intptr_t)ZEND_DYNAMIC_PROPERTY_OFFSET); in zend_get_property_offset()
386 …annot access %s property %s::$%s", zend_visibility_string(flags), ZSTR_VAL(ce->name), ZSTR_VAL(mem… in zend_get_property_offset()
393 CACHE_POLYMORPHIC_PTR_EX(cache_slot, ce, (void*)(intptr_t)property_info->offset); in zend_get_property_offset()
399 ZEND_API zend_property_info *zend_get_property_info(zend_class_entry *ce, zend_string *member, int … in zend_get_property_info() argument
413 if (UNEXPECTED(zend_hash_num_elements(&ce->properties_info) == 0)) { in zend_get_property_info()
417 zv = zend_hash_find(&ce->properties_info, member); in zend_get_property_info()
425 if (EXPECTED(zend_verify_property_access(property_info, ce) != 0)) { in zend_get_property_info()
430 …zend_error(E_NOTICE, "Accessing static property %s::$%s as non static", ZSTR_VAL(ce->name), ZSTR_V… in zend_get_property_info()
448 if (scope != ce in zend_get_property_info()
450 && is_derived_class(ce, scope) in zend_get_property_info()
460 …annot access %s property %s::$%s", zend_visibility_string(flags), ZSTR_VAL(ce->name), ZSTR_VAL(mem… in zend_get_property_info()
484 property_info = zend_get_property_info(zobj->ce, member, 1); in zend_check_property_access()
505 return zend_verify_property_access(property_info, zobj->ce) ? SUCCESS : FAILURE; in zend_check_property_access()
524 zv = zobj->properties_table + zobj->ce->default_properties_count; in zend_get_property_guard()
589 …property_offset = zend_get_property_offset(zobj->ce, Z_STR_P(member), (type == BP_VAR_IS) || (zobj… in zend_std_read_property()
609 if ((type == BP_VAR_IS) && zobj->ce->__isset) { in zend_std_read_property()
637 if (zobj->ce->__get) { in zend_std_read_property()
656 …modification of overloaded property %s::$%s has no effect", ZSTR_VAL(zobj->ce->name), Z_STRVAL_P(m… in zend_std_read_property()
675 zend_error(E_NOTICE,"Undefined property: %s::$%s", ZSTR_VAL(zobj->ce->name), Z_STRVAL_P(member)); in zend_std_read_property()
704 …property_offset = zend_get_property_offset(zobj->ce, Z_STR_P(member), (zobj->ce->__set != NULL), c… in zend_std_write_property()
730 if (zobj->ce->__set) { in zend_std_write_property()
781 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_read_dimension() local
784 if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1) != 0)) { in zend_std_read_dimension()
795 zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetexists", rv, &tmp_offset); in zend_std_read_dimension()
810 zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetget", rv, &tmp_offset); in zend_std_read_dimension()
817 …zend_throw_error(NULL, "Undefined offset for object of type %s used as array", ZSTR_VAL(ce->name)); in zend_std_read_dimension()
823 zend_throw_error(NULL, "Cannot use object of type %s as array", ZSTR_VAL(ce->name)); in zend_std_read_dimension()
831 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_write_dimension() local
834 if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1) != 0)) { in zend_std_write_dimension()
842 zend_call_method_with_2_params(&tmp_object, ce, NULL, "offsetset", NULL, &tmp_offset, value); in zend_std_write_dimension()
846 zend_throw_error(NULL, "Cannot use object of type %s as array", ZSTR_VAL(ce->name)); in zend_std_write_dimension()
853 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_has_dimension() local
857 if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1) != 0)) { in zend_std_has_dimension()
861 zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetexists", &retval, &tmp_offset); in zend_std_has_dimension()
866 zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetget", &retval, &tmp_offset); in zend_std_has_dimension()
878 zend_throw_error(NULL, "Cannot use object of type %s as array", ZSTR_VAL(ce->name)); in zend_std_has_dimension()
903 property_offset = zend_get_property_offset(zobj->ce, name, (zobj->ce->__get != NULL), cache_slot); in zend_std_get_property_ptr_ptr()
909 if (EXPECTED(!zobj->ce->__get) || in zend_std_get_property_ptr_ptr()
915 zend_error(E_NOTICE, "Undefined property: %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); in zend_std_get_property_ptr_ptr()
937 if (EXPECTED(!zobj->ce->__get) || in zend_std_get_property_ptr_ptr()
946 zend_error(E_NOTICE, "Undefined property: %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); in zend_std_get_property_ptr_ptr()
974 …property_offset = zend_get_property_offset(zobj->ce, Z_STR_P(member), (zobj->ce->__unset != NULL),… in zend_std_unset_property()
1004 if (zobj->ce->__unset) { in zend_std_unset_property()
1032 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_unset_dimension() local
1035 if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1)) { in zend_std_unset_dimension()
1039 zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetunset", NULL, &tmp_offset); in zend_std_unset_dimension()
1043 zend_throw_error(NULL, "Cannot use object of type %s as array", ZSTR_VAL(ce->name)); in zend_std_unset_dimension()
1052 static inline zend_function *zend_check_private_int(zend_function *fbc, zend_class_entry *ce, zend_… in zend_check_private_int() argument
1057 if (!ce) { in zend_check_private_int()
1068 if (fbc->common.scope == ce && scope == ce) { in zend_check_private_int()
1075 ce = ce->parent; in zend_check_private_int()
1076 while (ce) { in zend_check_private_int()
1077 if (ce == scope) { in zend_check_private_int()
1078 if ((func = zend_hash_find(&ce->function_table, function_name))) { in zend_check_private_int()
1087 ce = ce->parent; in zend_check_private_int()
1093 ZEND_API int zend_check_private(zend_function *fbc, zend_class_entry *ce, zend_string *function_nam… in zend_check_private() argument
1095 return zend_check_private_int(fbc, ce, function_name) != NULL; in zend_check_private()
1101 ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope) /* {{{ */ in zend_check_protected() argument
1103 zend_class_entry *fbc_scope = ce; in zend_check_protected()
1119 if (scope==ce) { in zend_check_protected()
1128 ZEND_API zend_function *zend_get_call_trampoline_func(zend_class_entry *ce, zend_string *method_nam… in zend_get_call_trampoline_func() argument
1132 zend_function *fbc = is_static ? ce->__callstatic : ce->__call; in zend_get_call_trampoline_func()
1172 static zend_always_inline zend_function *zend_get_user_call_function(zend_class_entry *ce, zend_str… in zend_get_user_call_function() argument
1174 return zend_get_call_trampoline_func(ce, method_name, 0); in zend_get_user_call_function()
1197 if (UNEXPECTED((func = zend_hash_find(&zobj->ce->function_table, lc_method_name)) == NULL)) { in zend_std_get_method()
1201 if (zobj->ce->__call) { in zend_std_get_method()
1202 return zend_get_user_call_function(zobj->ce, method_name); in zend_std_get_method()
1216 updated_fbc = zend_check_private_int(fbc, zobj->ce, lc_method_name); in zend_std_get_method()
1220 if (zobj->ce->__call) { in zend_std_get_method()
1221 fbc = zend_get_user_call_function(zobj->ce, method_name); in zend_std_get_method()
1251 if (zobj->ce->__call) { in zend_std_get_method()
1252 fbc = zend_get_user_call_function(zobj->ce, method_name); in zend_std_get_method()
1268 static zend_always_inline zend_function *zend_get_user_callstatic_function(zend_class_entry *ce, ze… in zend_get_user_callstatic_function() argument
1270 return zend_get_call_trampoline_func(ce, method_name, 1); in zend_get_user_callstatic_function()
1274 ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name… in zend_std_get_static_method() argument
1288 zval *func = zend_hash_find(&ce->function_table, lc_function_name); in zend_std_get_static_method()
1291 } else if (ce->constructor in zend_std_get_static_method()
1292 && ZSTR_LEN(lc_function_name) == ZSTR_LEN(ce->name) in zend_std_get_static_method()
1293 …&& zend_binary_strncasecmp(ZSTR_VAL(lc_function_name), ZSTR_LEN(lc_function_name), ZSTR_VAL(ce->na… in zend_std_get_static_method()
1297 && (ZSTR_VAL(ce->constructor->common.function_name)[0] != '_' in zend_std_get_static_method()
1298 || ZSTR_VAL(ce->constructor->common.function_name)[1] != '_')) { in zend_std_get_static_method()
1299 fbc = ce->constructor; in zend_std_get_static_method()
1304 if (ce->__call && in zend_std_get_static_method()
1306 instanceof_function(object->ce, ce)) { in zend_std_get_static_method()
1310 zend_class_entry *call_ce = object->ce; in zend_std_get_static_method()
1316 } else if (ce->__callstatic) { in zend_std_get_static_method()
1317 return zend_get_user_callstatic_function(ce, function_name); in zend_std_get_static_method()
1343 if (ce->__callstatic) { in zend_std_get_static_method()
1344 fbc = zend_get_user_callstatic_function(ce, function_name); in zend_std_get_static_method()
1355 if (ce->__callstatic) { in zend_std_get_static_method()
1356 fbc = zend_get_user_callstatic_function(ce, function_name); in zend_std_get_static_method()
1372 ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, zend_… in zend_std_get_static_property() argument
1374 zend_property_info *property_info = zend_hash_find_ptr(&ce->properties_info, property_name); in zend_std_get_static_property()
1381 if (UNEXPECTED(!zend_verify_property_access(property_info, ce))) { in zend_std_get_static_property()
1383 … property %s::$%s", zend_visibility_string(property_info->flags), ZSTR_VAL(ce->name), ZSTR_VAL(pro… in zend_std_get_static_property()
1392 if (UNEXPECTED(!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED))) { in zend_std_get_static_property()
1393 if (UNEXPECTED(zend_update_class_constants(ce)) != SUCCESS) { in zend_std_get_static_property()
1397 ret = CE_STATIC_MEMBERS(ce) + property_info->offset; in zend_std_get_static_property()
1400 if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) { in zend_std_get_static_property()
1403 …zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_V… in zend_std_get_static_property()
1412 ZEND_API ZEND_COLD zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *prop… in zend_std_unset_static_property() argument
1414 …zend_throw_error(NULL, "Attempt to unset static property %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(pr… in zend_std_unset_static_property()
1421 zend_function *constructor = zobj->ce->constructor; in zend_std_get_constructor()
1477 if (zobj1->ce != zobj2->ce) { in zend_std_compare_objects()
1483 if (!zobj1->ce->default_properties_count) { in zend_std_compare_objects()
1488 end = p1 + zobj1->ce->default_properties_count; in zend_std_compare_objects()
1553 property_offset = zend_get_property_offset(zobj->ce, Z_STR_P(member), 1, cache_slot); in zend_std_has_property()
1584 if ((has_set_exists != 2) && zobj->ce->__isset) { in zend_std_has_property()
1603 if (EXPECTED(!EG(exception)) && zobj->ce->__get && !((*guard) & IN_GET)) { in zend_std_has_property()
1633 return zend_string_copy(zobj->ce->name); in zend_std_object_get_class_name()
1640 zend_class_entry *ce; in zend_std_cast_object_tostring() local
1644 ce = Z_OBJCE_P(readobj); in zend_std_cast_object_tostring()
1645 if (ce->__tostring && in zend_std_cast_object_tostring()
1646 …(zend_call_method_with_0_params(readobj, ce, &ce->__tostring, "__tostring", &retval) || EG(excepti… in zend_std_cast_object_tostring()
1659 ZSTR_VAL(ce->name), ZSTR_VAL(Z_OBJCE(ex)->name), Z_STRVAL_P(msg)); in zend_std_cast_object_tostring()
1674 …ror(E_RECOVERABLE_ERROR, "Method %s::__toString() must return a string value", ZSTR_VAL(ce->name)); in zend_std_cast_object_tostring()
1683 ce = Z_OBJCE_P(readobj); in zend_std_cast_object_tostring()
1684 zend_error(E_NOTICE, "Object of class %s could not be converted to int", ZSTR_VAL(ce->name)); in zend_std_cast_object_tostring()
1691 ce = Z_OBJCE_P(readobj); in zend_std_cast_object_tostring()
1692 zend_error(E_NOTICE, "Object of class %s could not be converted to float", ZSTR_VAL(ce->name)); in zend_std_cast_object_tostring()
1709 zend_class_entry *ce; in zend_std_get_closure() local
1715 ce = Z_OBJCE_P(obj); in zend_std_get_closure()
1717 if ((func = zend_hash_find(&ce->function_table, ZSTR_KNOWN(ZEND_STR_MAGIC_INVOKE))) == NULL) { in zend_std_get_closure()
1722 *ce_ptr = ce; in zend_std_get_closure()