Answers questions about visibility and access rights for class members (properties, methods, constants) from the current analysis context. This interface is the Scope's role as an access control checker. It is passed as a parameter to Type methods like getMethod(), getProperty(), getConstant(), etc., so the type system can enforce visibility rules (public/protected/private) based on where the access occurs. The primary implementation is MutatingScope. A secondary implementation, OutOfClassScope, is used when accessing members from outside any class.
| Methods | ||
|---|---|---|
public
|
isInClass(): bool
|
# |
public
|
getClassReflection(): ?ClassReflection
|
# |
public
|
canAccessProperty(PropertyReflection $propertyReflection): bool
|
# |
public
|
canReadProperty(ExtendedPropertyReflection $propertyReflection): bool
|
# |
public
|
canWriteProperty(ExtendedPropertyReflection $propertyReflection): bool
|
# |
public
|
canCallMethod(MethodReflection $methodReflection): bool
|
# |
public
|
canAccessConstant(ClassConstantReflection $constantReflection): bool
|
# |