Lines Matching refs:scope
240 …r_inline int is_protected_compatible_scope(zend_class_entry *ce, zend_class_entry *scope) /* {{{ */ in is_protected_compatible_scope() argument
242 return scope && in is_protected_compatible_scope()
243 (is_derived_class(ce, scope) || is_derived_class(scope, ce)); in is_protected_compatible_scope()
247 …ne zend_property_info *zend_get_parent_private_property(zend_class_entry *scope, zend_class_entry … in zend_get_parent_private_property() argument
252 if (scope != ce && scope && is_derived_class(ce, scope)) { in zend_get_parent_private_property()
253 zv = zend_hash_find(&scope->properties_info, member); in zend_get_parent_private_property()
257 && prop_info->ce == scope) { in zend_get_parent_private_property()
285 zend_class_entry *ce, zend_string *member, zend_class_entry *scope, const char *operation) { in zend_readonly_property_modification_scope_error() argument
288 scope ? "scope " : "global scope", scope ? ZSTR_VAL(scope->name) : ""); in zend_readonly_property_modification_scope_error()
302 zend_class_entry *scope; in zend_get_property_offset() local
331 scope = EG(fake_scope); in zend_get_property_offset()
333 scope = zend_get_executed_scope(); in zend_get_property_offset()
336 if (property_info->ce != scope) { in zend_get_property_offset()
338 zend_property_info *p = zend_get_parent_private_property(scope, ce, member); in zend_get_property_offset()
365 if (UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_get_property_offset()
408 zend_class_entry *scope; in zend_get_property_info() local
427 scope = EG(fake_scope); in zend_get_property_info()
429 scope = zend_get_executed_scope(); in zend_get_property_info()
431 if (property_info->ce != scope) { in zend_get_property_info()
433 zend_property_info *p = zend_get_parent_private_property(scope, ce, member); in zend_get_property_info()
456 if (UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_get_property_info()
754 zend_class_entry *scope; in verify_readonly_initialization_access() local
756 scope = EG(fake_scope); in verify_readonly_initialization_access()
758 scope = zend_get_executed_scope(); in verify_readonly_initialization_access()
760 if (prop_info->ce == scope) { in verify_readonly_initialization_access()
766 if (scope && is_derived_class(ce, scope)) { in verify_readonly_initialization_access()
767 zend_property_info *prop_info = zend_hash_find_ptr(&scope->properties_info, name); in verify_readonly_initialization_access()
771 if (prop_info->ce == scope) { in verify_readonly_initialization_access()
777 zend_readonly_property_modification_scope_error(prop_info->ce, name, scope, operation); in verify_readonly_initialization_access()
1179 static zend_never_inline zend_function *zend_get_parent_private_method(zend_class_entry *scope, zen… in zend_get_parent_private_method() argument
1184 if (scope != ce && scope && is_derived_class(ce, scope)) { in zend_get_parent_private_method()
1185 func = zend_hash_find(&scope->function_table, function_name); in zend_get_parent_private_method()
1189 && fbc->common.scope == scope) { in zend_get_parent_private_method()
1200 ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope) /* {{{ */ in zend_check_protected() argument
1208 if (fbc_scope==scope) { in zend_check_protected()
1217 while (scope) { in zend_check_protected()
1218 if (scope==ce) { in zend_check_protected()
1221 scope = scope->parent; in zend_check_protected()
1256 func->scope = fbc->common.scope; in zend_get_call_trampoline_func()
1292 …nd_bad_method_call(zend_function *fbc, zend_string *method_name, zend_class_entry *scope) /* {{{ */ in zend_bad_method_call() argument
1296 scope ? "scope " : "global scope", in zend_bad_method_call()
1297 scope ? ZSTR_VAL(scope->name) : "" in zend_bad_method_call()
1305 ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); in zend_abstract_method_call()
1315 zend_class_entry *scope; in zend_std_get_method() local
1343 scope = zend_get_executed_scope(); in zend_std_get_method()
1345 if (fbc->common.scope != scope) { in zend_std_get_method()
1347 zend_function *updated_fbc = zend_get_parent_private_method(scope, zobj->ce, lc_method_name); in zend_std_get_method()
1357 || UNEXPECTED(!zend_check_protected(zend_get_function_root_class(fbc), scope))) { in zend_std_get_method()
1361 zend_bad_method_call(fbc, method_name, scope); in zend_std_get_method()
1419 zend_class_entry *scope = zend_get_executed_scope(); in zend_std_get_static_method() local
1420 if (UNEXPECTED(fbc->common.scope != scope)) { in zend_std_get_static_method()
1422 || UNEXPECTED(!zend_check_protected(zend_get_function_root_class(fbc), scope))) { in zend_std_get_static_method()
1425 zend_bad_method_call(fbc, function_name, scope); in zend_std_get_static_method()
1443 } else if (UNEXPECTED(fbc->common.scope->ce_flags & ZEND_ACC_TRAIT)) { in zend_std_get_static_method()
1447 ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); in zend_std_get_static_method()
1485 zend_class_entry *scope; in zend_std_get_static_property_with_info() local
1495 scope = EG(fake_scope); in zend_std_get_static_property_with_info()
1497 scope = zend_get_executed_scope(); in zend_std_get_static_property_with_info()
1499 if (property_info->ce != scope) { in zend_std_get_static_property_with_info()
1501 || UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_std_get_static_property_with_info()
1563 …nline void zend_bad_constructor_call(zend_function *constructor, zend_class_entry *scope) /* {{{ */ in zend_bad_constructor_call() argument
1565 if (scope) { in zend_bad_constructor_call()
1567 zend_visibility_string(constructor->common.fn_flags), ZSTR_VAL(constructor->common.scope->name), in zend_bad_constructor_call()
1568 ZSTR_VAL(constructor->common.function_name), ZSTR_VAL(scope->name) in zend_bad_constructor_call()
1571 …bility_string(constructor->common.fn_flags), ZSTR_VAL(constructor->common.scope->name), ZSTR_VAL(c… in zend_bad_constructor_call()
1579 zend_class_entry *scope; in zend_std_get_constructor() local
1584 scope = EG(fake_scope); in zend_std_get_constructor()
1586 scope = zend_get_executed_scope(); in zend_std_get_constructor()
1588 if (UNEXPECTED(constructor->common.scope != scope)) { in zend_std_get_constructor()
1590 || UNEXPECTED(!zend_check_protected(zend_get_function_root_class(constructor), scope))) { in zend_std_get_constructor()
1591 zend_bad_constructor_call(constructor, scope); in zend_std_get_constructor()