class OptionalExtension implements MethodsClassReflectionExtension

Passes an Optional's method calls to the object it holds. The call returns null when the Optional may hold something else, and only null when it never holds an object.

Methods

__construct(RuntimeInputs $runtimeInputs)

Create a new extension instance.

bool
hasMethod(ClassReflection $classReflection, string $methodName)

Determine whether the object the Optional holds has the public method.

MethodReflection
getMethod(ClassReflection $classReflection, string $methodName)

Get the held object's method, returning what the Optional returns for it.

Details

at line 31
__construct(RuntimeInputs $runtimeInputs)

Create a new extension instance.

Parameters

RuntimeInputs $runtimeInputs

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

Determine whether the object the Optional holds has the public method.

Parameters

ClassReflection $classReflection
string $methodName

Return Value

bool

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

Get the held object's method, returning what the Optional returns for it.

Parameters

ClassReflection $classReflection
string $methodName

Return Value

MethodReflection