Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
Invoker\Invoker Class Reference
Inheritance diagram for Invoker\Invoker:
Invoker\InvokerInterface

Public Member Functions

 __construct (?ParameterResolver $parameterResolver=null, ?ContainerInterface $container=null)
 
 call ($callable, array $parameters=[])
 {Call the given function using the given parameters.
Parameters
callable | array | string$callableFunction to call.
array$parametersParameters to use.
Return values
mixedResult of the function.
Exceptions
InvocationExceptionBase exception class for all the sub-exceptions below.
NotCallableException
NotEnoughParametersException
}
 
 getCallableResolver ()
 
 getContainer ()
 
 getParameterResolver ()
 

Member Function Documentation

◆ call()

Invoker\Invoker::call ( $callable,
array $parameters = [] )

{Call the given function using the given parameters.

Parameters
callable | array | string$callableFunction to call.
array$parametersParameters to use.
Return values
mixedResult of the function.
Exceptions
InvocationExceptionBase exception class for all the sub-exceptions below.
NotCallableException
NotEnoughParametersException
}

Implements Invoker\InvokerInterface.

◆ getCallableResolver()

Invoker\Invoker::getCallableResolver ( )
Return values
CallableResolver|nullReturns null if no container was given in the constructor.

◆ getParameterResolver()

Invoker\Invoker::getParameterResolver ( )
Return values
ParameterResolverBy default it's a ResolverChain

The documentation for this class was generated from the following file: