src/Library/Helper/Code.php
public static function fetchArguments($method_name = null, $arguments = null, $class_name = null, &$logs = array())
    {
        $args_def = self::organizeArguments($method_name, $arguments, $class_name, $logs);
        if (!empty($class_name)) {
            if (is_callable(array($class_name, $method_name))) {
                return call_user_func_array(array($class_name, $method_name), $args_def);
            } else {
                $_cls = is_object($class_name) ? get_class($class_name) : $class_name;
                throw new \InvalidArgumentException(
                    sprintf('Method "%s" of class object "%s" is not callable!', $method_name, $_cls)
                );
            }
        } else {
            return call_user_func_array($method_name, $args_def);
        }
    }
public static function fetchArguments($method_name = null, $arguments = null, $class_name = null, &$logs = array())
    {
        $args_def = self::organizeArguments($method_name, $arguments, $class_name, $logs);
        if (!empty($class_name)) {
            if (is_callable(array($class_name, $method_name))) {
                return call_user_func_array(array($class_name, $method_name), $args_def);
            } else {
                $_cls = is_object($class_name) ? get_class($class_name) : $class_name;
                throw new \InvalidArgumentException(
                    sprintf('Method "%s" of class object "%s" is not callable!', $method_name, $_cls)
                );
            }
        } else {
            return call_user_func_array($method_name, $args_def);
        }
    }
public static function fetchArguments ( $ method_name = null , $ arguments = null , $ class_name = null , & $ logs = array ( ) ) { $ args_def = self :: organizeArguments ( $ method_name , $ arguments , $ class_name , $ logs ) ; if ( ! empty ( $ class_name ) ) { if ( is_callable ( array ( $ class_name , $ method_name ) ) ) { return call_user_func_array ( array ( $ class_name , $ method_name ) , $ args_def ) ; } else { $ _cls = is_object ( $ class_name ) ? get_class ( $ class_name ) : $ class_name ; throw new \ InvalidArgumentException ( sprintf ( 'Method "%s" of class object "%s" is not callable!' , $ method_name , $ _cls ) ) ; } } else { return call_user_func_array ( $ method_name , $ args_def ) ; } }
Launch a function or class's method fetching it arguments according to its declaration

@param   string  $method_name    The method name
@param   mixed   $arguments      A set of arguments to fetch
@param   string  $class_name     The class name
@param   array   $logs           Will be filled with indexes `miss` with missing required arguments
and `rest` with unused `$arguments` - Passed by reference
@return  mixed
@throws  \InvalidArgumentException if the method is not callable
Launch a function or class s method fetching it arguments according to its declaration