Lines Matching refs:ce

71 		zend_class_entry *ce = zobj->ce;  in rebuild_object_properties()  local
75 if (ce->default_properties_count) { in rebuild_object_properties()
76 for (zend_hash_internal_pointer_reset_ex(&ce->properties_info, &pos); in rebuild_object_properties()
77 zend_hash_get_current_data_ex(&ce->properties_info, (void**)&prop_info, &pos) == SUCCESS; in rebuild_object_properties()
78 zend_hash_move_forward_ex(&ce->properties_info, &pos)) { in rebuild_object_properties()
86 while (ce->parent && ce->parent->default_properties_count) { in rebuild_object_properties()
87 ce = ce->parent; in rebuild_object_properties()
88 for (zend_hash_internal_pointer_reset_ex(&ce->properties_info, &pos); in rebuild_object_properties()
89 zend_hash_get_current_data_ex(&ce->properties_info, (void**)&prop_info, &pos) == SUCCESS; in rebuild_object_properties()
90 zend_hash_move_forward_ex(&ce->properties_info, &pos)) { in rebuild_object_properties()
91 if (prop_info->ce == ce && in rebuild_object_properties()
131 *n = zobj->ce->default_properties_count; in zend_std_get_gc()
148 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_call_getter() local
158 zend_call_method_with_1_params(&object, ce, &ce->__get, ZEND_GET_FUNC_NAME, &retval, member); in zend_std_call_getter()
174 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_call_setter() local
185 …zend_call_method_with_2_params(&object, ce, &ce->__set, ZEND_SET_FUNC_NAME, &retval, member, value… in zend_std_call_setter()
202 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_call_unsetter() local
210 zend_call_method_with_1_params(&object, ce, &ce->__unset, ZEND_UNSET_FUNC_NAME, NULL, member); in zend_std_call_unsetter()
219 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_call_issetter() local
229 zend_call_method_with_1_params(&object, ce, &ce->__isset, ZEND_ISSET_FUNC_NAME, &retval, member); in zend_std_call_issetter()
237 …verify_property_access(zend_property_info *property_info, zend_class_entry *ce TSRMLS_DC) /* {{{ */ in zend_verify_property_access()
243 return zend_check_protected(property_info->ce, EG(scope)); in zend_verify_property_access()
245 if ((ce==EG(scope) || property_info->ce == EG(scope)) && EG(scope)) { in zend_verify_property_access()
270 …struct _zend_property_info *zend_get_property_info_quick(zend_class_entry *ce, zval *member, int s… in zend_get_property_info_quick() argument
277 if (key && (property_info = CACHED_POLYMORPHIC_PTR(key->cache_slot, ce)) != NULL) { in zend_get_property_info_quick()
293 …if (zend_hash_quick_find(&ce->properties_info, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, h, (void … in zend_get_property_info_quick()
298 if (EXPECTED(zend_verify_property_access(property_info, ce TSRMLS_CC) != 0)) { in zend_get_property_info_quick()
307 …zend_error(E_STRICT, "Accessing static property %s::$%s as non static", ce->name, Z_STRVAL_P(membe… in zend_get_property_info_quick()
310 CACHE_POLYMORPHIC_PTR(key->cache_slot, ce, property_info); in zend_get_property_info_quick()
320 if (EG(scope) != ce in zend_get_property_info_quick()
322 && is_derived_class(ce, EG(scope)) in zend_get_property_info_quick()
326 CACHE_POLYMORPHIC_PTR(key->cache_slot, ce, scope_property_info); in zend_get_property_info_quick()
333 …access %s property %s::$%s", zend_visibility_string(property_info->flags), ce->name, Z_STRVAL_P(me… in zend_get_property_info_quick()
339 CACHE_POLYMORPHIC_PTR(key->cache_slot, ce, property_info); in zend_get_property_info_quick()
347 EG(std_property_info).ce = ce; in zend_get_property_info_quick()
355 ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce, zval *member, int… in zend_get_property_info() argument
357 return zend_get_property_info_quick(ce, member, silent, NULL TSRMLS_CC); in zend_get_property_info()
370 property_info = zend_get_property_info_quick(zobj->ce, &member, 1, NULL TSRMLS_CC); in zend_check_property_access()
383 return zend_verify_property_access(property_info, zobj->ce TSRMLS_CC) ? SUCCESS : FAILURE; in zend_check_property_access()
449 …property_info = zend_get_property_info_quick(zobj->ce, member, silent || (zobj->ce->__get != NULL)… in zend_std_read_property()
461 if (zobj->ce->__get && in zend_std_read_property()
487 …Indirect modification of overloaded property %s::$%s has no effect", zobj->ce->name, Z_STRVAL_P(me… in zend_std_read_property()
499 if (zobj->ce->__get && guard && guard->in_get == 1) { in zend_std_read_property()
509 zend_error(E_NOTICE,"Undefined property: %s::$%s", zobj->ce->name, Z_STRVAL_P(member)); in zend_std_read_property()
542 …property_info = zend_get_property_info_quick(zobj->ce, member, (zobj->ce->__set != NULL), key TSRM… in zend_std_write_property()
583 if (zobj->ce->__set && in zend_std_write_property()
617 } else if (zobj->ce->__set && guard && guard->in_set == 1) { in zend_std_write_property()
636 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_read_dimension() local
639 if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC) != 0)) { in zend_std_read_dimension()
646 zend_call_method_with_1_params(&object, ce, NULL, "offsetget", &retval, offset); in zend_std_read_dimension()
652 zend_error_noreturn(E_ERROR, "Undefined offset for object of type %s used as array", ce->name); in zend_std_read_dimension()
662 zend_error_noreturn(E_ERROR, "Cannot use object of type %s as array", ce->name); in zend_std_read_dimension()
670 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_write_dimension() local
672 if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC) != 0)) { in zend_std_write_dimension()
678 zend_call_method_with_2_params(&object, ce, NULL, "offsetset", NULL, offset, value); in zend_std_write_dimension()
681 zend_error_noreturn(E_ERROR, "Cannot use object of type %s as array", ce->name); in zend_std_write_dimension()
688 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_has_dimension() local
692 if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC) != 0)) { in zend_std_has_dimension()
694 zend_call_method_with_1_params(&object, ce, NULL, "offsetexists", &retval, offset); in zend_std_has_dimension()
699 zend_call_method_with_1_params(&object, ce, NULL, "offsetget", &retval, offset); in zend_std_has_dimension()
710 zend_error_noreturn(E_ERROR, "Cannot use object of type %s as array", ce->name); in zend_std_has_dimension()
738 …property_info = zend_get_property_info_quick(zobj->ce, member, (zobj->ce->__get != NULL), key TSRM… in zend_std_get_property_ptr_ptr()
751 if (!zobj->ce->__get || in zend_std_get_property_ptr_ptr()
780 zend_error(E_NOTICE, "Undefined property: %s::$%s", zobj->ce->name, Z_STRVAL_P(member)); in zend_std_get_property_ptr_ptr()
812 …property_info = zend_get_property_info_quick(zobj->ce, member, (zobj->ce->__unset != NULL), key TS… in zend_std_unset_property()
826 if (zobj->ce->__unset && in zend_std_unset_property()
838 } else if (zobj->ce->__unset && guard && guard->in_unset == 1) { in zend_std_unset_property()
861 zend_class_entry *ce = Z_OBJCE_P(object); in zend_std_unset_dimension() local
863 if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) { in zend_std_unset_dimension()
865 zend_call_method_with_1_params(&object, ce, NULL, "offsetunset", NULL, offset); in zend_std_unset_dimension()
868 zend_error_noreturn(E_ERROR, "Cannot use object of type %s as array", ce->name); in zend_std_unset_dimension()
878 zend_class_entry *ce = Z_OBJCE_P(this_ptr); in zend_std_call_user_call() local
899 …zend_call_method_with_2_params(&this_ptr, ce, &ce->__call, ZEND_CALL_FUNC_NAME, &method_result_ptr… in zend_std_call_user_call()
922 static inline zend_function *zend_check_private_int(zend_function *fbc, zend_class_entry *ce, char … in zend_check_private_int() argument
924 if (!ce) { in zend_check_private_int()
934 if (fbc->common.scope == ce && EG(scope) == ce) { in zend_check_private_int()
941 ce = ce->parent; in zend_check_private_int()
942 while (ce) { in zend_check_private_int()
943 if (ce == EG(scope)) { in zend_check_private_int()
944 …if (zend_hash_quick_find(&ce->function_table, function_name_strval, function_name_strlen+1, hash_v… in zend_check_private_int()
951 ce = ce->parent; in zend_check_private_int()
957 ZEND_API int zend_check_private(zend_function *fbc, zend_class_entry *ce, char *function_name_strva… in zend_check_private() argument
959 …return zend_check_private_int(fbc, ce, function_name_strval, function_name_strlen, zend_hash_func(… in zend_check_private()
965 ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope) /* {{{ */ in zend_check_protected() argument
967 zend_class_entry *fbc_scope = ce; in zend_check_protected()
983 if (scope==ce) { in zend_check_protected()
992 static inline union _zend_function *zend_get_user_call_function(zend_class_entry *ce, const char *m… in zend_get_user_call_function() argument
996 call_user_call->module = (ce->type == ZEND_INTERNAL_CLASS) ? ce->info.internal.module : NULL; in zend_get_user_call_function()
1000 call_user_call->scope = ce; in zend_get_user_call_function()
1027 …if (UNEXPECTED(zend_hash_quick_find(&zobj->ce->function_table, lc_method_name, method_len+1, hash_… in zend_std_get_method()
1031 if (zobj->ce->__call) { in zend_std_get_method()
1032 return zend_get_user_call_function(zobj->ce, method_name, method_len); in zend_std_get_method()
1049 if (zobj->ce->__call) { in zend_std_get_method()
1050 fbc = zend_get_user_call_function(zobj->ce, method_name, method_len); in zend_std_get_method()
1075 if (zobj->ce->__call) { in zend_std_get_method()
1076 fbc = zend_get_user_call_function(zobj->ce, method_name, method_len); in zend_std_get_method()
1096 zend_class_entry *ce = EG(scope); in zend_std_callstatic_user_call() local
1116 …zend_call_method_with_2_params(NULL, ce, &ce->__callstatic, ZEND_CALLSTATIC_FUNC_NAME, &method_res… in zend_std_callstatic_user_call()
1135 static inline union _zend_function *zend_get_user_callstatic_function(zend_class_entry *ce, const c… in zend_get_user_callstatic_function() argument
1139 …callstatic_user_call->module = (ce->type == ZEND_INTERNAL_CLASS) ? ce->info.internal.module : NU… in zend_get_user_callstatic_function()
1143 callstatic_user_call->scope = ce; in zend_get_user_callstatic_function()
1153 ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, const char *function_name_… in zend_std_get_static_method() argument
1170 if (function_name_strlen == ce->name_length && ce->constructor) { in zend_std_get_static_method()
1171 lc_class_name = zend_str_tolower_dup(ce->name, ce->name_length); in zend_std_get_static_method()
1175 …if (!memcmp(lc_class_name, lc_function_name, function_name_strlen) && memcmp(ce->constructor->comm… in zend_std_get_static_method()
1176 fbc = ce->constructor; in zend_std_get_static_method()
1181 …UNEXPECTED(zend_hash_quick_find(&ce->function_table, lc_function_name, function_name_strlen+1, has… in zend_std_get_static_method()
1186 if (ce->__call && in zend_std_get_static_method()
1189 instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) { in zend_std_get_static_method()
1190 return zend_get_user_call_function(ce, function_name_strval, function_name_strlen); in zend_std_get_static_method()
1191 } else if (ce->__callstatic) { in zend_std_get_static_method()
1192 return zend_get_user_callstatic_function(ce, function_name_strval, function_name_strlen); in zend_std_get_static_method()
1216 if (ce->__callstatic) { in zend_std_get_static_method()
1217 fbc = zend_get_user_callstatic_function(ce, function_name_strval, function_name_strlen); in zend_std_get_static_method()
1226 if (ce->__callstatic) { in zend_std_get_static_method()
1227 fbc = zend_get_user_callstatic_function(ce, function_name_strval, function_name_strlen); in zend_std_get_static_method()
1242 ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, const char *property_name, int p… in zend_std_get_static_property() argument
1248 (property_info = CACHED_POLYMORPHIC_PTR(key->cache_slot, ce)) == NULL) { in zend_std_get_static_property()
1255 …if (UNEXPECTED(zend_hash_quick_find(&ce->properties_info, property_name, property_name_len+1, hash… in zend_std_get_static_property()
1257 …zend_error_noreturn(E_ERROR, "Access to undeclared static property: %s::$%s", ce->name, property_n… in zend_std_get_static_property()
1263 …zend_printf("Access type for %s::%s is %s\n", ce->name, property_name, zend_visibility_string(prop… in zend_std_get_static_property()
1266 if (UNEXPECTED(!zend_verify_property_access(property_info, ce TSRMLS_CC))) { in zend_std_get_static_property()
1268 …access %s property %s::$%s", zend_visibility_string(property_info->flags), ce->name, property_name… in zend_std_get_static_property()
1275 …zend_error_noreturn(E_ERROR, "Access to undeclared static property: %s::$%s", ce->name, property_n… in zend_std_get_static_property()
1280 zend_update_class_constants(ce TSRMLS_CC); in zend_std_get_static_property()
1283 CACHE_POLYMORPHIC_PTR(key->cache_slot, ce, property_info); in zend_std_get_static_property()
1287 if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL) || in zend_std_get_static_property()
1288 UNEXPECTED(CE_STATIC_MEMBERS(ce)[property_info->offset] == NULL)) { in zend_std_get_static_property()
1290 …zend_error_noreturn(E_ERROR, "Access to undeclared static property: %s::$%s", ce->name, property_n… in zend_std_get_static_property()
1295 return &CE_STATIC_MEMBERS(ce)[property_info->offset]; in zend_std_get_static_property()
1299 ZEND_API zend_bool zend_std_unset_static_property(zend_class_entry *ce, const char *property_name, … in zend_std_unset_static_property() argument
1301 zend_error_noreturn(E_ERROR, "Attempt to unset static property %s::$%s", ce->name, property_name); in zend_std_unset_static_property()
1309 zend_function *constructor = zobj->ce->constructor; in zend_std_get_constructor()
1352 if (zobj1->ce != zobj2->ce) { in zend_std_compare_objects()
1360 for (i = 0; i < zobj1->ce->default_properties_count; i++) { in zend_std_compare_objects()
1427 property_info = zend_get_property_info_quick(zobj->ce, member, 1, key TSRMLS_CC); in zend_std_has_property()
1441 zobj->ce->__isset && in zend_std_has_property()
1457 if (EXPECTED(!EG(exception)) && zobj->ce->__get && !guard->in_get) { in zend_std_has_property()
1502 return zobj->ce; in zend_std_object_get_class()
1509 zend_class_entry *ce; in zend_std_object_get_class_name() local
1513 if (!zobj->ce->parent) { in zend_std_object_get_class_name()
1516 ce = zobj->ce->parent; in zend_std_object_get_class_name()
1518 ce = zobj->ce; in zend_std_object_get_class_name()
1521 *class_name_len = ce->name_length; in zend_std_object_get_class_name()
1522 *class_name = estrndup(ce->name, ce->name_length); in zend_std_object_get_class_name()
1530 zend_class_entry *ce; in zend_std_cast_object_tostring() local
1534 ce = Z_OBJCE_P(readobj); in zend_std_cast_object_tostring()
1535 if (ce->__tostring && in zend_std_cast_object_tostring()
1536 …(zend_call_method_with_0_params(&readobj, ce, &ce->__tostring, "__tostring", &retval) || EG(except… in zend_std_cast_object_tostring()
1542 zend_error_noreturn(E_ERROR, "Method %s::__toString() must not throw an exception", ce->name); in zend_std_cast_object_tostring()
1562 … zend_error(E_RECOVERABLE_ERROR, "Method %s::__toString() must return a string value", ce->name); in zend_std_cast_object_tostring()
1572 ce = Z_OBJCE_P(readobj); in zend_std_cast_object_tostring()
1573 zend_error(E_NOTICE, "Object of class %s could not be converted to int", ce->name); in zend_std_cast_object_tostring()
1581 ce = Z_OBJCE_P(readobj); in zend_std_cast_object_tostring()
1582 zend_error(E_NOTICE, "Object of class %s could not be converted to double", ce->name); in zend_std_cast_object_tostring()
1600 zend_class_entry *ce; in zend_std_get_closure() local
1605 ce = Z_OBJCE_P(obj); in zend_std_get_closure()
1607 …if (zend_hash_find(&ce->function_table, ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME), (voi… in zend_std_get_closure()
1611 *ce_ptr = ce; in zend_std_get_closure()