Invoker¶
-
php\lang\Invoker Class for calling methods/functions/etc.
Methods
__construct($callback)¶
Parameters:
- $callback – callable
callArray($args)¶Call with array arguments
Parameters:
- $args – array
Returns: mixed
call()¶Call the current callback
Returns: int, mixed
__invoke()¶
canAccess()¶Check access to invoke the method at a moment
Returns: bool
getDescription()¶Returns description of the method - name + argument info
Returns: string
getArgumentCount()¶Returns argument count of the method
Returns: int
isClosure()¶Checks it is a closure
Returns: bool
isNamedFunction()¶Checks it is a named function
Returns: bool
isStaticCall()¶Checks it is a static call
Returns: bool
isDynamicCall()¶Checks it is a dynamic call
Returns: bool
- static
of($callback)¶
Parameters:
- $callback – mixed, callable
Returns: php\lang\Invoker, null - returns
nullif passed is not callable