MacroRegistrationExtension
class MacroRegistrationExtension implements DynamicMethodReturnTypeExtension, StaticMethodParameterClosureThisExtension
Type the call forms of an Eloquent builder's macro() and mixin() that differ: Builder::__callStatic() binds a global macro to the builder, and an instance mixin() reaches the query's, returning the builder.
Methods
Get the class the extension applies to.
Determine whether the call is an instance mixin().
Return the builder an instance mixin() returns.
Determine whether the call registers a global macro.
Bind a global macro to the builder it is registered on.
Details
at line 30
string
getClass()
Get the class the extension applies to.
at line 38
bool
isMethodSupported(MethodReflection $methodReflection)
Determine whether the call is an instance mixin().
at line 47
Type
getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope)
Return the builder an instance mixin() returns.
at line 55
bool
isStaticMethodSupported(MethodReflection $methodReflection, ParameterReflection $parameter)
Determine whether the call registers a global macro.
at line 64
Type
getClosureThisTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, ParameterReflection $parameter, Scope $scope)
Bind a global macro to the builder it is registered on.