Lines Matching refs:scope

241 …r_inline int is_protected_compatible_scope(zend_class_entry *ce, zend_class_entry *scope) /* {{{ */  in is_protected_compatible_scope()  argument
243 return scope && in is_protected_compatible_scope()
244 (is_derived_class(ce, scope) || is_derived_class(scope, ce)); in is_protected_compatible_scope()
248 …ne zend_property_info *zend_get_parent_private_property(zend_class_entry *scope, zend_class_entry … in zend_get_parent_private_property() argument
253 if (scope != ce && scope && is_derived_class(ce, scope)) { in zend_get_parent_private_property()
254 zv = zend_hash_find(&scope->properties_info, member); in zend_get_parent_private_property()
258 && prop_info->ce == scope) { in zend_get_parent_private_property()
304 zend_class_entry *ce, zend_string *member, zend_class_entry *scope, const char *operation) { in zend_readonly_property_modification_scope_error() argument
307 scope ? "scope " : "global scope", scope ? ZSTR_VAL(scope->name) : ""); in zend_readonly_property_modification_scope_error()
321 zend_class_entry *scope; in zend_get_property_offset() local
350 scope = EG(fake_scope); in zend_get_property_offset()
352 scope = zend_get_executed_scope(); in zend_get_property_offset()
355 if (property_info->ce != scope) { in zend_get_property_offset()
357 zend_property_info *p = zend_get_parent_private_property(scope, ce, member); in zend_get_property_offset()
384 if (UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_get_property_offset()
427 zend_class_entry *scope; in zend_get_property_info() local
446 scope = EG(fake_scope); in zend_get_property_info()
448 scope = zend_get_executed_scope(); in zend_get_property_info()
450 if (property_info->ce != scope) { in zend_get_property_info()
452 zend_property_info *p = zend_get_parent_private_property(scope, ce, member); in zend_get_property_info()
475 if (UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_get_property_info()
772 zend_class_entry *scope; in verify_readonly_initialization_access() local
774 scope = EG(fake_scope); in verify_readonly_initialization_access()
776 scope = zend_get_executed_scope(); in verify_readonly_initialization_access()
778 if (prop_info->ce == scope) { in verify_readonly_initialization_access()
784 if (scope && is_derived_class(ce, scope)) { in verify_readonly_initialization_access()
785 zend_property_info *prop_info = zend_hash_find_ptr(&scope->properties_info, name); in verify_readonly_initialization_access()
789 if (prop_info->ce == scope) { in verify_readonly_initialization_access()
795 zend_readonly_property_modification_scope_error(prop_info->ce, name, scope, operation); in verify_readonly_initialization_access()
1213 static zend_never_inline zend_function *zend_get_parent_private_method(zend_class_entry *scope, zen… in zend_get_parent_private_method() argument
1218 if (scope != ce && scope && is_derived_class(ce, scope)) { in zend_get_parent_private_method()
1219 func = zend_hash_find(&scope->function_table, function_name); in zend_get_parent_private_method()
1223 && fbc->common.scope == scope) { in zend_get_parent_private_method()
1234 ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope) /* {{{ */ in zend_check_protected() argument
1242 if (fbc_scope==scope) { in zend_check_protected()
1251 while (scope) { in zend_check_protected()
1252 if (scope==ce) { in zend_check_protected()
1255 scope = scope->parent; in zend_check_protected()
1293 func->scope = fbc->common.scope; in zend_get_call_trampoline_func()
1330 …nd_bad_method_call(zend_function *fbc, zend_string *method_name, zend_class_entry *scope) /* {{{ */ in zend_bad_method_call() argument
1334 scope ? "scope " : "global scope", in zend_bad_method_call()
1335 scope ? ZSTR_VAL(scope->name) : "" in zend_bad_method_call()
1343 ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); in zend_abstract_method_call()
1353 zend_class_entry *scope; in zend_std_get_method() local
1381 scope = zend_get_executed_scope(); in zend_std_get_method()
1383 if (fbc->common.scope != scope) { in zend_std_get_method()
1385 zend_function *updated_fbc = zend_get_parent_private_method(scope, zobj->ce, lc_method_name); in zend_std_get_method()
1395 || UNEXPECTED(!zend_check_protected(zend_get_function_root_class(fbc), scope))) { in zend_std_get_method()
1399 zend_bad_method_call(fbc, method_name, scope); in zend_std_get_method()
1457 zend_class_entry *scope = zend_get_executed_scope(); in zend_std_get_static_method() local
1458 if (UNEXPECTED(fbc->common.scope != scope)) { in zend_std_get_static_method()
1460 || UNEXPECTED(!zend_check_protected(zend_get_function_root_class(fbc), scope))) { in zend_std_get_static_method()
1463 zend_bad_method_call(fbc, function_name, scope); in zend_std_get_static_method()
1481 } else if (UNEXPECTED(fbc->common.scope->ce_flags & ZEND_ACC_TRAIT)) { in zend_std_get_static_method()
1485 ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); in zend_std_get_static_method()
1523 zend_class_entry *scope; in zend_std_get_static_property_with_info() local
1533 scope = EG(fake_scope); in zend_std_get_static_property_with_info()
1535 scope = zend_get_executed_scope(); in zend_std_get_static_property_with_info()
1537 if (property_info->ce != scope) { in zend_std_get_static_property_with_info()
1539 || UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_std_get_static_property_with_info()
1601 …nline void zend_bad_constructor_call(zend_function *constructor, zend_class_entry *scope) /* {{{ */ in zend_bad_constructor_call() argument
1603 if (scope) { in zend_bad_constructor_call()
1605 zend_visibility_string(constructor->common.fn_flags), ZSTR_VAL(constructor->common.scope->name), in zend_bad_constructor_call()
1606 ZSTR_VAL(constructor->common.function_name), ZSTR_VAL(scope->name) in zend_bad_constructor_call()
1609 …bility_string(constructor->common.fn_flags), ZSTR_VAL(constructor->common.scope->name), ZSTR_VAL(c… in zend_bad_constructor_call()
1617 zend_class_entry *scope; in zend_std_get_constructor() local
1622 scope = EG(fake_scope); in zend_std_get_constructor()
1624 scope = zend_get_executed_scope(); in zend_std_get_constructor()
1626 if (UNEXPECTED(constructor->common.scope != scope)) { in zend_std_get_constructor()
1628 || UNEXPECTED(!zend_check_protected(zend_get_function_root_class(constructor), scope))) { in zend_std_get_constructor()
1629 zend_bad_constructor_call(constructor, scope); in zend_std_get_constructor()