src/RawPHP/RawContainer/Container.php
public function call( $callback, array $parameters = [ ], $defaultMethod = NULL )
    {
        if ( is_string( $callback ) )
        {
            return $this->callClass( $callback, $parameters, $defaultMethod );
        }

        $dependencies = $this->getMethodDependencies( $callback, $parameters );

        return call_user_func_array( $callback, $dependencies );
    }
public function call( $callback, array $parameters = [ ], $defaultMethod = NULL )
    {
        if ( is_string( $callback ) )
        {
            return $this->callClass( $callback, $parameters, $defaultMethod );
        }

        $dependencies = $this->getMethodDependencies( $callback, $parameters );

        return call_user_func_array( $callback, $dependencies );
    }
Call the given Closure / class@method and inject its dependencies.

@param  callable|string $callback
@param  array           $parameters
@param  string|null     $defaultMethod

@return mixed