Invoker

php\lang\Invoker

Class for calling methods/functions/etc.

Methods


__construct($callback)
Параметры:
  • $callbackcallable
callArray($args)

Call with array arguments

Параметры:
  • $argsarray
Результат:

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)
Параметры:
  • $callbackmixed, callable
Результат:

php\lang\Invoker, null - returns null if passed is not callable