|
|
@@ -20,14 +20,16 @@ class Reflection
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Appel une fonction avec ses paramètres d'une classe
|
|
|
* @param string $serviceName
|
|
|
* @param string $method
|
|
|
* @param array $parameters
|
|
|
* @return mixed
|
|
|
+ * @throws \ReflectionException
|
|
|
*/
|
|
|
public function dynamicInvokeWithArgsServiceMethod(string $serviceName, string $method, array $parameters = []) {
|
|
|
$function = $this->container->get($serviceName);
|
|
|
- $reflection = \ReflectionClass(get_class($function));
|
|
|
+ $reflection = new \ReflectionClass(get_class($function));
|
|
|
$method = $reflection->getMethod($method);
|
|
|
return $method->invokeArgs($function, $parameters);
|
|
|
}
|