ReflectionMethod::getClosure
Returns a dynamically created closure for the method
Description
public Closure ReflectionMethod::getClosure(objectnull $object = null)
Parameters
-
object
-
Forbidden for static methods, required for other methods.
Return Values
Returns the newly created Closure.
Errors/Exceptions
Throws a ValueError if object is null but the method is non-static.
Throws a ReflectionException if object is not an instance of the class this method was declared in.