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

string
getClass()

Get the class the extension applies to.

bool
isMethodSupported(MethodReflection $methodReflection)

Determine whether the call is an instance mixin().

Type
getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope)

Return the builder an instance mixin() returns.

bool
isStaticMethodSupported(MethodReflection $methodReflection, ParameterReflection $parameter)

Determine whether the call registers a global macro.

Type
getClosureThisTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, ParameterReflection $parameter, Scope $scope)

Bind a global macro to the builder it is registered on.

Details

at line 30
string getClass()

Get the class the extension applies to.

Return Value

string

at line 38
bool isMethodSupported(MethodReflection $methodReflection)

Determine whether the call is an instance mixin().

Parameters

MethodReflection $methodReflection

Return Value

bool

at line 47
Type getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope)

Return the builder an instance mixin() returns.

Parameters

MethodReflection $methodReflection
MethodCall $methodCall
Scope $scope

Return Value

Type

at line 55
bool isStaticMethodSupported(MethodReflection $methodReflection, ParameterReflection $parameter)

Determine whether the call registers a global macro.

Parameters

MethodReflection $methodReflection
ParameterReflection $parameter

Return Value

bool

at line 64
Type getClosureThisTypeFromStaticMethodCall(MethodReflection $methodReflection, StaticCall $methodCall, ParameterReflection $parameter, Scope $scope)

Bind a global macro to the builder it is registered on.

Parameters

MethodReflection $methodReflection
StaticCall $methodCall
ParameterReflection $parameter
Scope $scope

Return Value

Type