Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
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: