class ModelRelationsExtension implements PropertiesClassReflectionExtension

internal  
 

Methods

__construct(CollectionHelper $collectionHelper, ReflectionProvider $reflectionProvider, ModelHelper $modelHelper, ClosureTypeFactory $closureTypeFactory)

Create a new model relations extension instance.

bool
hasProperty(ClassReflection $classReflection, string $propertyName)

Determine whether the property is a relation or a relation count.

TrinaryLogic
isRelationMethod(ClassReflection $classReflection, string $methodName)

Determine whether a model method is a relation the model can load: a native method that the base model does not declare, callable without arguments, returning a relation.

PropertyReflection
getProperty(ClassReflection $classReflection, string $propertyName)

Get the relation's result or count property.

Details

at line 41
__construct(CollectionHelper $collectionHelper, ReflectionProvider $reflectionProvider, ModelHelper $modelHelper, ClosureTypeFactory $closureTypeFactory)

Create a new model relations extension instance.

Parameters

CollectionHelper $collectionHelper
ReflectionProvider $reflectionProvider
ModelHelper $modelHelper
ClosureTypeFactory $closureTypeFactory

at line 55
bool hasProperty(ClassReflection $classReflection, string $propertyName)

Determine whether the property is a relation or a relation count.

Parameters

ClassReflection $classReflection
string $propertyName

Return Value

bool

at line 127
TrinaryLogic isRelationMethod(ClassReflection $classReflection, string $methodName)

Determine whether a model method is a relation the model can load: a native method that the base model does not declare, callable without arguments, returning a relation.

Unlike upstream, a method without a declared relation return may be a relation of unknown type.

Parameters

ClassReflection $classReflection
string $methodName

Return Value

TrinaryLogic

at line 149
PropertyReflection getProperty(ClassReflection $classReflection, string $propertyName)

Get the relation's result or count property.

Parameters

ClassReflection $classReflection
string $propertyName

Return Value

PropertyReflection