OptionalExtension
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
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.
at line 39
bool
hasMethod(ClassReflection $classReflection, string $methodName)
Determine whether the object the Optional holds has the public method.
at line 59
MethodReflection
getMethod(ClassReflection $classReflection, string $methodName)
Get the held object's method, returning what the Optional returns for it.