Lines Matching refs:scope

240 … is_protected_compatible_scope(const zend_class_entry *ce, const 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, const zend_class_… 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()
303 …const zend_class_entry *ce, const zend_string *member, const zend_class_entry *scope, const char *… in zend_readonly_property_modification_scope_error() argument
306 scope ? "scope " : "global scope", scope ? ZSTR_VAL(scope->name) : ""); in zend_readonly_property_modification_scope_error()
320 zend_class_entry *scope; in zend_get_property_offset() local
349 scope = EG(fake_scope); in zend_get_property_offset()
351 scope = zend_get_executed_scope(); in zend_get_property_offset()
354 if (property_info->ce != scope) { in zend_get_property_offset()
356 zend_property_info *p = zend_get_parent_private_property(scope, ce, member); in zend_get_property_offset()
383 if (UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_get_property_offset()
426 zend_class_entry *scope; in zend_get_property_info() local
445 scope = EG(fake_scope); in zend_get_property_info()
447 scope = zend_get_executed_scope(); in zend_get_property_info()
449 if (property_info->ce != scope) { in zend_get_property_info()
451 zend_property_info *p = zend_get_parent_private_property(scope, ce, member); in zend_get_property_info()
474 if (UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_get_property_info()
782 zend_class_entry *scope; in verify_readonly_initialization_access() local
784 scope = EG(fake_scope); in verify_readonly_initialization_access()
786 scope = zend_get_executed_scope(); in verify_readonly_initialization_access()
788 if (prop_info->ce == scope) { in verify_readonly_initialization_access()
794 if (scope && is_derived_class(ce, scope)) { in verify_readonly_initialization_access()
795 const zend_property_info *prop_info = zend_hash_find_ptr(&scope->properties_info, name); in verify_readonly_initialization_access()
799 if (prop_info->ce == scope) { in verify_readonly_initialization_access()
805 zend_readonly_property_modification_scope_error(prop_info->ce, name, scope, operation); in verify_readonly_initialization_access()
1270 static zend_never_inline zend_function *zend_get_parent_private_method(zend_class_entry *scope, zen… in zend_get_parent_private_method() argument
1275 if (scope != ce && scope && is_derived_class(ce, scope)) { in zend_get_parent_private_method()
1276 func = zend_hash_find(&scope->function_table, function_name); in zend_get_parent_private_method()
1280 && fbc->common.scope == scope) { in zend_get_parent_private_method()
1291 ZEND_API bool zend_check_protected(const zend_class_entry *ce, const zend_class_entry *scope) /* {{… in zend_check_protected() argument
1299 if (fbc_scope==scope) { in zend_check_protected()
1308 while (scope) { in zend_check_protected()
1309 if (scope==ce) { in zend_check_protected()
1312 scope = scope->parent; in zend_check_protected()
1347 func->scope = fbc->common.scope; in zend_get_call_trampoline_func()
1383 …nd_bad_method_call(zend_function *fbc, zend_string *method_name, zend_class_entry *scope) /* {{{ */ in zend_bad_method_call() argument
1387 scope ? "scope " : "global scope", in zend_bad_method_call()
1388 scope ? ZSTR_VAL(scope->name) : "" in zend_bad_method_call()
1396 ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); in zend_abstract_method_call()
1406 zend_class_entry *scope; in zend_std_get_method() local
1434 scope = zend_get_executed_scope(); in zend_std_get_method()
1436 if (fbc->common.scope != scope) { in zend_std_get_method()
1438 zend_function *updated_fbc = zend_get_parent_private_method(scope, zobj->ce, lc_method_name); in zend_std_get_method()
1448 || UNEXPECTED(!zend_check_protected(zend_get_function_root_class(fbc), scope))) { in zend_std_get_method()
1452 zend_bad_method_call(fbc, method_name, scope); in zend_std_get_method()
1510 zend_class_entry *scope = zend_get_executed_scope(); in zend_std_get_static_method() local
1511 if (UNEXPECTED(fbc->common.scope != scope)) { in zend_std_get_static_method()
1513 || UNEXPECTED(!zend_check_protected(zend_get_function_root_class(fbc), scope))) { in zend_std_get_static_method()
1516 zend_bad_method_call(fbc, function_name, scope); in zend_std_get_static_method()
1534 } else if (UNEXPECTED(fbc->common.scope->ce_flags & ZEND_ACC_TRAIT)) { in zend_std_get_static_method()
1538 ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); in zend_std_get_static_method()
1576 zend_class_entry *scope; in zend_std_get_static_property_with_info() local
1586 scope = EG(fake_scope); in zend_std_get_static_property_with_info()
1588 scope = zend_get_executed_scope(); in zend_std_get_static_property_with_info()
1590 if (property_info->ce != scope) { in zend_std_get_static_property_with_info()
1592 || UNEXPECTED(!is_protected_compatible_scope(property_info->ce, scope))) { in zend_std_get_static_property_with_info()
1654 …nline void zend_bad_constructor_call(zend_function *constructor, zend_class_entry *scope) /* {{{ */ in zend_bad_constructor_call() argument
1656 if (scope) { in zend_bad_constructor_call()
1658 zend_visibility_string(constructor->common.fn_flags), ZSTR_VAL(constructor->common.scope->name), in zend_bad_constructor_call()
1659 ZSTR_VAL(constructor->common.function_name), ZSTR_VAL(scope->name) in zend_bad_constructor_call()
1662 …bility_string(constructor->common.fn_flags), ZSTR_VAL(constructor->common.scope->name), ZSTR_VAL(c… in zend_bad_constructor_call()
1670 zend_class_entry *scope; in zend_std_get_constructor() local
1675 scope = EG(fake_scope); in zend_std_get_constructor()
1677 scope = zend_get_executed_scope(); in zend_std_get_constructor()
1679 if (UNEXPECTED(constructor->common.scope != scope)) { in zend_std_get_constructor()
1681 || UNEXPECTED(!zend_check_protected(zend_get_function_root_class(constructor), scope))) { in zend_std_get_constructor()
1682 zend_bad_constructor_call(constructor, scope); in zend_std_get_constructor()