Lines Matching refs:ce
70 zend_class_entry *ce = zobj->ce; in rebuild_object_properties_internal() local
73 zobj->properties = zend_new_array(ce->default_properties_count); in rebuild_object_properties_internal()
74 if (ce->default_properties_count) { in rebuild_object_properties_internal()
76 for (i = 0; i < ce->default_properties_count; i++) { in rebuild_object_properties_internal()
77 prop_info = ce->properties_info_table[i]; in rebuild_object_properties_internal()
101 zend_class_entry *ce = zobj->ce; in zend_std_build_object_properties_array() local
108 ht = zend_new_array(ce->default_properties_count); in zend_std_build_object_properties_array()
109 if (ce->default_properties_count) { in zend_std_build_object_properties_array()
111 for (i = 0; i < ce->default_properties_count; i++) { in zend_std_build_object_properties_array()
112 prop_info = ce->properties_info_table[i]; in zend_std_build_object_properties_array()
177 *n = zobj->ce->default_properties_count; in zend_std_get_gc()
186 zend_class_entry *ce = object->ce; in zend_std_get_debug_info() local
190 if (!ce->__debugInfo) { in zend_std_get_debug_info()
199 zend_call_known_instance_method_with_0_params(ce->__debugInfo, object, &retval); in zend_std_get_debug_info()
229 zend_call_known_instance_method_with_1_params(zobj->ce->__get, zobj, retval, &member); in zend_std_call_getter()
238 zend_call_known_instance_method(zobj->ce->__set, zobj, NULL, 2, args); in zend_std_call_setter()
246 zend_call_known_instance_method_with_1_params(zobj->ce->__unset, zobj, NULL, &member); in zend_std_call_unsetter()
254 zend_call_known_instance_method_with_1_params(zobj->ce->__isset, zobj, retval, &member); in zend_std_call_issetter()
273 static zend_never_inline int is_protected_compatible_scope(const zend_class_entry *ce, const zend_c… in is_protected_compatible_scope() argument
276 (is_derived_class(ce, scope) || is_derived_class(scope, ce)); in is_protected_compatible_scope()
280 …t_parent_private_property(zend_class_entry *scope, const zend_class_entry *ce, zend_string *member… in zend_get_parent_private_property() argument
285 if (scope != ce && scope && is_derived_class(ce, scope)) { in zend_get_parent_private_property()
290 && prop_info->ce == scope) { in zend_get_parent_private_property()
299 …ty_access(const zend_property_info *property_info, const zend_class_entry *ce, const zend_string *… in zend_bad_property_access() argument
301 … property %s::$%s", zend_visibility_string(property_info->flags), ZSTR_VAL(ce->name), ZSTR_VAL(mem… in zend_bad_property_access()
312 const zend_class_entry *ce, const zend_string *member) { in zend_forbidden_dynamic_property() argument
314 ZSTR_VAL(ce->name), ZSTR_VAL(member)); in zend_forbidden_dynamic_property()
321 ZSTR_VAL(obj->ce->name), ZSTR_VAL(member)); in zend_deprecated_dynamic_property()
323 zend_class_entry *ce = obj->ce; in zend_deprecated_dynamic_property() local
328 ZSTR_VAL(ce->name), ZSTR_VAL(member)); in zend_deprecated_dynamic_property()
336 zend_class_entry *ce, zend_string *member) { in zend_readonly_property_unset_error() argument
338 ZSTR_VAL(ce->name), ZSTR_VAL(member)); in zend_readonly_property_unset_error()
350 static zend_always_inline uintptr_t zend_get_property_offset(zend_class_entry *ce, zend_string *mem… in zend_get_property_offset() argument
357 if (cache_slot && EXPECTED(ce == CACHED_PTR_EX(cache_slot))) { in zend_get_property_offset()
362 if (UNEXPECTED(zend_hash_num_elements(&ce->properties_info) == 0) in zend_get_property_offset()
363 || UNEXPECTED((zv = zend_hash_find(&ce->properties_info, member)) == NULL)) { in zend_get_property_offset()
372 CACHE_POLYMORPHIC_PTR_EX(cache_slot, ce, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); in zend_get_property_offset()
384 if (property_info->ce != scope) { in zend_get_property_offset()
386 zend_property_info *p = zend_get_parent_private_property(scope, ce, member); in zend_get_property_offset()
401 if (property_info->ce != ce) { in zend_get_property_offset()
407 zend_bad_property_access(property_info, ce, member); in zend_get_property_offset()
413 if (UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_get_property_offset()
423 …zend_error(E_NOTICE, "Accessing static property %s::$%s as non static", ZSTR_VAL(ce->name), ZSTR_V… in zend_get_property_offset()
431 CACHE_POLYMORPHIC_PTR_EX(cache_slot, ce, (void*)ZEND_HOOKED_PROPERTY_OFFSET); in zend_get_property_offset()
444 CACHE_POLYMORPHIC_PTR_EX(cache_slot, ce, (void*)(uintptr_t)offset); in zend_get_property_offset()
451 static ZEND_COLD void zend_wrong_offset(zend_class_entry *ce, zend_string *member) /* {{{ */ in zend_wrong_offset() argument
456 zend_get_property_offset(ce, member, 0, NULL, &dummy); in zend_wrong_offset()
460 ZEND_API zend_property_info *zend_get_property_info(const zend_class_entry *ce, zend_string *member… in zend_get_property_info() argument
466 if (UNEXPECTED(zend_hash_num_elements(&ce->properties_info) == 0) in zend_get_property_info()
467 || EXPECTED((zv = zend_hash_find(&ce->properties_info, member)) == NULL)) { in zend_get_property_info()
483 if (property_info->ce != scope) { in zend_get_property_info()
485 zend_property_info *p = zend_get_parent_private_property(scope, ce, member); in zend_get_property_info()
496 if (property_info->ce != ce) { in zend_get_property_info()
502 zend_bad_property_access(property_info, ce, member); in zend_get_property_info()
508 if (UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_get_property_info()
518 …zend_error(E_NOTICE, "Accessing static property %s::$%s as non static", ZSTR_VAL(ce->name), ZSTR_V… in zend_get_property_info()
540 property_info = zend_get_property_info(zobj->ce, member, 1); in zend_check_property_access()
559 property_info = zend_get_property_info(zobj->ce, prop_info_name, 1); in zend_check_property_access()
575 if (prop_info->ce == scope) { in zend_asymmetric_property_has_set_access()
579 && is_protected_compatible_scope(prop_info->ce, scope)); in zend_asymmetric_property_has_set_access()
592 return zobj->properties_table + zobj->ce->default_properties_count; in zend_get_guard_value()
602 ZEND_ASSERT(zobj->ce->ce_flags & ZEND_ACC_USE_GUARDS); in zend_get_property_guard()
645 if (!(zobj->ce->ce_flags & ZEND_ACC_USE_GUARDS)) { in zend_get_recursion_guard()
655 ZSTR_VAL(prop_info->ce->name), in zend_typed_property_uninitialized_access()
694 zend_throw_no_prop_backing_value_access(zobj->ce->name, prop_name, /* is_read */ true); in zend_call_get_hook()
716 …property_offset = zend_get_property_offset(zobj->ce, name, (type == BP_VAR_IS) || (zobj->ce->__get… in zend_std_read_property()
783 ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); in zend_std_read_property()
801 ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); in zend_std_read_property()
810 zend_class_entry *ce = zobj->ce; in zend_std_read_property() local
832 && ce->default_object_handlers->read_property == zend_std_read_property in zend_std_read_property()
833 && !ce->create_object in zend_std_read_property()
845 ZSTR_VAL(ce->name), ZSTR_VAL(name)); in zend_std_read_property()
860 if ((type == BP_VAR_IS) && zobj->ce->__isset) { in zend_std_read_property()
880 if (zobj->ce->__get && !((*guard) & IN_GET)) { in zend_std_read_property()
884 } else if (zobj->ce->__get && !((*guard) & IN_GET)) { in zend_std_read_property()
887 } else if (zobj->ce->__get) { in zend_std_read_property()
904 …modification of overloaded property %s::$%s has no effect", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(nam… in zend_std_read_property()
912 …zend_verify_prop_assignable_by_ref_ex(prop_info, retval, (zobj->ce->__get->common.fn_flags & ZEND_… in zend_std_read_property()
919 zend_wrong_offset(zobj->ce, name); in zend_std_read_property()
942 zend_error(E_WARNING, "Undefined property: %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); in zend_std_read_property()
967 …property_offset = zend_get_property_offset(zobj->ce, name, (zobj->ce->__set != NULL), cache_slot, … in zend_std_write_property()
975 …(variable_ptr) != IS_UNDEF || (Z_PROP_FLAG_P(variable_ptr) & IS_PROP_UNINIT) || !zobj->ce->__set) { in zend_std_write_property()
1075 … zend_throw_error(NULL, "Property %s::$%s is read-only", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); in zend_std_write_property()
1089 zend_throw_no_prop_backing_value_access(zobj->ce->name, name, /* is_read */ false); in zend_std_write_property()
1126 if (zobj->ce->__set) { in zend_std_write_property()
1146 zend_wrong_offset(zobj->ce, name); in zend_std_write_property()
1167 if (UNEXPECTED(zobj->ce->ce_flags & ZEND_ACC_NO_DYNAMIC_PROPERTIES)) { in zend_std_write_property()
1168 zend_forbidden_dynamic_property(zobj->ce, name); in zend_std_write_property()
1172 if (UNEXPECTED(!(zobj->ce->ce_flags & ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES))) { in zend_std_write_property()
1205 static ZEND_COLD zend_never_inline void zend_bad_array_access(zend_class_entry *ce) /* {{{ */ in zend_bad_array_access() argument
1207 zend_throw_error(NULL, "Cannot use object of type %s as array", ZSTR_VAL(ce->name)); in zend_bad_array_access()
1213 zend_class_entry *ce = object->ce; in zend_std_read_dimension() local
1217 zend_class_arrayaccess_funcs *funcs = ce->arrayaccess_funcs_ptr; in zend_std_read_dimension()
1250 …zend_throw_error(NULL, "Undefined offset for object of type %s used as array", ZSTR_VAL(ce->name)); in zend_std_read_dimension()
1256 zend_bad_array_access(ce); in zend_std_read_dimension()
1264 zend_class_entry *ce = object->ce; in zend_std_write_dimension() local
1267 zend_class_arrayaccess_funcs *funcs = ce->arrayaccess_funcs_ptr; in zend_std_write_dimension()
1279 zend_bad_array_access(ce); in zend_std_write_dimension()
1287 zend_class_entry *ce = object->ce; in zend_std_has_dimension() local
1291 zend_class_arrayaccess_funcs *funcs = ce->arrayaccess_funcs_ptr; in zend_std_has_dimension()
1306 zend_bad_array_access(ce); in zend_std_has_dimension()
1324 …property_offset = zend_get_property_offset(zobj->ce, name, (zobj->ce->__get != NULL), cache_slot, … in zend_std_get_property_ptr_ptr()
1329 if (EXPECTED(!zobj->ce->__get) || in zend_std_get_property_ptr_ptr()
1345 … zend_error(E_WARNING, "Undefined property: %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); in zend_std_get_property_ptr_ptr()
1379 if (EXPECTED(!zobj->ce->__get) || in zend_std_get_property_ptr_ptr()
1381 if (UNEXPECTED(zobj->ce->ce_flags & ZEND_ACC_NO_DYNAMIC_PROPERTIES)) { in zend_std_get_property_ptr_ptr()
1382 zend_forbidden_dynamic_property(zobj->ce, name); in zend_std_get_property_ptr_ptr()
1385 if (UNEXPECTED(!(zobj->ce->ce_flags & ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES))) { in zend_std_get_property_ptr_ptr()
1402 zend_error(E_WARNING, "Undefined property: %s::$%s", ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); in zend_std_get_property_ptr_ptr()
1406 } else if (!IS_HOOKED_PROPERTY_OFFSET(property_offset) && zobj->ce->__get == NULL) { in zend_std_get_property_ptr_ptr()
1420 …property_offset = zend_get_property_offset(zobj->ce, name, (zobj->ce->__unset != NULL), cache_slot… in zend_std_unset_property()
1427 if (Z_TYPE_P(slot) != IS_UNDEF || Z_PROP_FLAG_P(slot) & IS_PROP_UNINIT || !zobj->ce->__unset) { in zend_std_unset_property()
1437 zend_readonly_property_unset_error(prop_info->ce, name); in zend_std_unset_property()
1490 ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); in zend_std_unset_property()
1497 if (zobj->ce->__unset) { in zend_std_unset_property()
1509 zend_wrong_offset(zobj->ce, name); in zend_std_unset_property()
1530 zend_class_entry *ce = object->ce; in zend_std_unset_dimension() local
1533 zend_class_arrayaccess_funcs *funcs = ce->arrayaccess_funcs_ptr; in zend_std_unset_dimension()
1541 zend_bad_array_access(ce); in zend_std_unset_dimension()
1546 …*zend_get_parent_private_method(zend_class_entry *scope, zend_class_entry *ce, zend_string *functi… in zend_get_parent_private_method() argument
1551 if (scope != ce && scope && is_derived_class(ce, scope)) { in zend_get_parent_private_method()
1567 ZEND_API bool zend_check_protected(const zend_class_entry *ce, const zend_class_entry *scope) /* {{… in zend_check_protected() argument
1569 const zend_class_entry *fbc_scope = ce; in zend_check_protected()
1585 if (scope==ce) { in zend_check_protected()
1594 ZEND_API zend_function *zend_get_call_trampoline_func(const zend_class_entry *ce, zend_string *meth… in zend_get_call_trampoline_func() argument
1598 zend_function *fbc = is_static ? ce->__callstatic : ce->__call; in zend_get_call_trampoline_func()
1724 func->common.scope = prop_info->ce; in zend_get_property_hook_trampoline()
1739 static zend_always_inline zend_function *zend_get_user_call_function(zend_class_entry *ce, zend_str… in zend_get_user_call_function() argument
1741 return zend_get_call_trampoline_func(ce, method_name, 0); in zend_get_user_call_function()
1781 if (UNEXPECTED((func = zend_hash_find(&zobj->ce->function_table, lc_method_name)) == NULL)) { in zend_std_get_method()
1785 if (zobj->ce->__call) { in zend_std_get_method()
1786 return zend_get_user_call_function(zobj->ce, method_name); in zend_std_get_method()
1800 zend_function *updated_fbc = zend_get_parent_private_method(scope, zobj->ce, lc_method_name); in zend_std_get_method()
1811 if (zobj->ce->__call) { in zend_std_get_method()
1812 fbc = zend_get_user_call_function(zobj->ce, method_name); in zend_std_get_method()
1833 static zend_always_inline zend_function *zend_get_user_callstatic_function(zend_class_entry *ce, ze… in zend_get_user_callstatic_function() argument
1835 return zend_get_call_trampoline_func(ce, method_name, 1); in zend_get_user_callstatic_function()
1840 zend_class_entry *ce, zend_string *function_name) in get_static_method_fallback() argument
1843 if (ce->__call && in get_static_method_fallback()
1845 instanceof_function(object->ce, ce)) { in get_static_method_fallback()
1849 ZEND_ASSERT(object->ce->__call); in get_static_method_fallback()
1850 return zend_get_user_call_function(object->ce, function_name); in get_static_method_fallback()
1851 } else if (ce->__callstatic) { in get_static_method_fallback()
1852 return zend_get_user_callstatic_function(ce, function_name); in get_static_method_fallback()
1858 ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name… in zend_std_get_static_method() argument
1868 zval *func = zend_hash_find(&ce->function_table, lc_function_name); in zend_std_get_static_method()
1876 zend_function *fallback_fbc = get_static_method_fallback(ce, function_name); in zend_std_get_static_method()
1885 fbc = get_static_method_fallback(ce, function_name); in zend_std_get_static_method()
1935 ZEND_API zval *zend_std_get_static_property_with_info(zend_class_entry *ce, zend_string *property_n… in zend_std_get_static_property_with_info() argument
1938 zend_property_info *property_info = zend_hash_find_ptr(&ce->properties_info, property_name); in zend_std_get_static_property_with_info()
1947 if (property_info->ce != scope) { in zend_std_get_static_property_with_info()
1949 || UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_std_get_static_property_with_info()
1951 zend_bad_property_access(property_info, ce, property_name); in zend_std_get_static_property_with_info()
1961 …zend_throw_error(NULL, "Access to undeclared static property %s::$%s", ZSTR_VAL(ce->name), ZSTR_VA… in zend_std_get_static_property_with_info()
1966 if (UNEXPECTED(!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED))) { in zend_std_get_static_property_with_info()
1967 if (UNEXPECTED(zend_update_class_constants(ce) != SUCCESS)) { in zend_std_get_static_property_with_info()
1973 if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) { in zend_std_get_static_property_with_info()
1974 zend_class_init_statics(ce); in zend_std_get_static_property_with_info()
1977 ret = CE_STATIC_MEMBERS(ce) + property_info->offset; in zend_std_get_static_property_with_info()
1983 ZSTR_VAL(property_info->ce->name), ZSTR_VAL(property_name)); in zend_std_get_static_property_with_info()
1987 if (UNEXPECTED(ce->ce_flags & ZEND_ACC_TRAIT)) { in zend_std_get_static_property_with_info()
1991 ZSTR_VAL(property_info->ce->name), ZSTR_VAL(property_name)); in zend_std_get_static_property_with_info()
1998 ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, int t… in zend_std_get_static_property() argument
2001 return zend_std_get_static_property_with_info(ce, property_name, type, &prop_info); in zend_std_get_static_property()
2004 ZEND_API ZEND_COLD bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_… in zend_std_unset_static_property() argument
2006 …zend_throw_error(NULL, "Attempt to unset static property %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(pr… in zend_std_unset_static_property()
2026 zend_function *constructor = zobj->ce->constructor; in zend_std_get_constructor()
2093 if (zobj1->ce != zobj2->ce) { in zend_std_compare_objects()
2101 if (!zobj1->ce->default_properties_count) { in zend_std_compare_objects()
2116 for (i = 0; i < zobj1->ce->default_properties_count; i++) { in zend_std_compare_objects()
2119 info = zobj1->ce->properties_info_table[i]; in zend_std_compare_objects()
2172 property_offset = zend_get_property_offset(zobj->ce, name, 1, cache_slot, &prop_info); in zend_std_has_property()
2236 ZSTR_VAL(zobj->ce->name), ZSTR_VAL(name)); in zend_std_has_property()
2267 if (!zobj->ce->__isset) { in zend_std_has_property()
2285 if (EXPECTED(!EG(exception)) && zobj->ce->__get && !((*guard) & IN_GET)) { in zend_std_has_property()
2323 return zend_string_copy(zobj->ce->name); in zend_std_get_class_name()
2331 zend_class_entry *ce = readobj->ce; in zend_std_cast_object_tostring() local
2332 if (ce->__tostring) { in zend_std_cast_object_tostring()
2335 zend_call_known_instance_method_with_0_params(ce->__tostring, readobj, &retval); in zend_std_cast_object_tostring()
2343 … zend_throw_error(NULL, "Method %s::__toString() must return a string value", ZSTR_VAL(ce->name)); in zend_std_cast_object_tostring()
2359 zend_class_entry *ce = obj->ce; in zend_std_get_closure() local
2360 zval *func = zend_hash_find_known_hash(&ce->function_table, ZSTR_KNOWN(ZEND_STR_MAGIC_INVOKE)); in zend_std_get_closure()
2367 *ce_ptr = ce; in zend_std_get_closure()
2397 if (obj->ce->num_hooked_props) { in zend_std_get_properties_for()