class DynamicRelationMethodExtension implements MethodsClassReflectionExtension

Describe the relation methods that __call() handles: a model's relations that resolveRelationUsing() registers and its through{Relation}() calls, and a pending has-through relationship's has{Relation}() calls.

Methods

__construct(ReflectionProvider $reflectionProvider, ModelHelper $modelHelper, BuilderHelper $builderHelper, ClosureTypeFactory $closureTypeFactory)

Create a dynamic relation method extension.

bool
hasMethod(ClassReflection $classReflection, string $methodName)

Determine whether the class's __call() handles the method as a relation.

MethodReflection
getMethod(ClassReflection $classReflection, string $methodName)

Return the relation method.

Details

at line 41
__construct(ReflectionProvider $reflectionProvider, ModelHelper $modelHelper, BuilderHelper $builderHelper, ClosureTypeFactory $closureTypeFactory)

Create a dynamic relation method extension.

Parameters

ReflectionProvider $reflectionProvider
ModelHelper $modelHelper
BuilderHelper $builderHelper
ClosureTypeFactory $closureTypeFactory

at line 52
bool hasMethod(ClassReflection $classReflection, string $methodName)

Determine whether the class's __call() handles the method as a relation.

Parameters

ClassReflection $classReflection
string $methodName

Return Value

bool

at line 60
MethodReflection getMethod(ClassReflection $classReflection, string $methodName)

Return the relation method.

Parameters

ClassReflection $classReflection
string $methodName

Return Value

MethodReflection