ModelScopeMethodResolver
class ModelScopeMethodResolver
Resolve model methods exposed as named Eloquent scopes.
Methods
MethodReflection|null
resolve(ClassReflection $modelClass, string $scope)
Resolve a model scope by its exposed name.
array|null
resolveForType(Type $modelType, string $scope)
Resolve a scope for a model type, and the class declaring it.
static bool
isLegacyScopeName(string $methodName)
Determine whether a method's declared name makes it a legacy scope, as Model::isLegacyScopeMethod() reads it.
Details
at line 27
MethodReflection|null
resolve(ClassReflection $modelClass, string $scope)
Resolve a model scope by its exposed name.
at line 40
array|null
resolveForType(Type $modelType, string $scope)
Resolve a scope for a model type, and the class declaring it.
An intersection such as Model&HasTimeline can declare the scope through an interface. A union is declined, as its members can resolve the name differently.
at line 66
static bool
isLegacyScopeName(string $methodName)
Determine whether a method's declared name makes it a legacy scope, as Model::isLegacyScopeMethod() reads it.