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