src/Container.php
public function call($function, array $parameters = [])
    {
        $inspector = new ReflectionFunction($function);

        $dependencies = $inspector->getParameters();
        $dependencies = $this->process('', $parameters, $dependencies);

        return call_user_func_array($function, $dependencies);
    }
public function call($function, array $parameters = [])
    {
        $inspector = new ReflectionFunction($function);

        $dependencies = $inspector->getParameters();
        $dependencies = $this->process('', $parameters, $dependencies);

        return call_user_func_array($function, $dependencies);
    }
public function call ( $ function , array $ parameters = [ ] ) { $ inspector = new ReflectionFunction ( $ function ) ; $ dependencies = $ inspector -> getParameters ( ) ; $ dependencies = $ this -> process ( '' , $ parameters , $ dependencies ) ; return call_user_func_array ( $ function , $ dependencies ) ; }
Call a user function injecting the dependencies.

@param string|Closure $function   The function or the user function name.
@param array          $parameters The predefined dependencies.

@return mixed
Call a user function injecting the dependencies .