ModelRelationsExtension
class ModelRelationsExtension implements PropertiesClassReflectionExtension
| internal |
Methods
Create a new model relations extension instance.
Determine whether the property is a relation or a relation count.
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.
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.
at line 55
bool
hasProperty(ClassReflection $classReflection, string $propertyName)
Determine whether the property is a relation or a relation count.
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.
at line 149
PropertyReflection
getProperty(ClassReflection $classReflection, string $propertyName)
Get the relation's result or count property.