Call a class method with arguments and verify the arguments if they are in the list of method arguments or not.
php
ObjectHelper::callMethodSanitizeArguments(new MyClass(), 'methodToCall', ['paramName' => 'paramValue']);
public static callMethodSanitizeArguments ( object $object, string $method, array $argumentsList = [] ) : object | ||
$object | object | The class object where the method must be found. |
$method | string | The class method to call inside the object. |
$argumentsList | array | A massiv assigned list of array items, where the key is bind to the method argument and the value to be passed in the method on call. |
return | object |