PHP-DI注入静态类

I've started using PHP-DI to manage some dependency injection for a custom CMS. It's integrated with FastRoute that will manage the routing (I've started writing my own routing system but for now is too poor to be used in production). I need to inject an instance of RedBeanPHP that will use mainly static methods. After reading the docs, I can't achive the scope, is there any way to accomplish this task?

<?php 

require_once __DIR__.'/vendor/autoload.php';

use \RedBeanPHP\R;

// Thi part of code is taken from the docs of FastRoute on github
$dispatcher = FastRoute\simpleDispatcher(function(FastRoute\RouteCollector $router) {
    $router->addRoute('GET', '/', 'Controller/index');
    /* User uri mapping */
    $router->addGroup('/user' , function(FastRoute\RouteCollector $router){
      $router->addRoute('GET', '/', 'UserController/index');
      $router->addRoute('POST', '/doRegistration', 'UserController/register');
    });
});

// Fetch method and URI from somewhere
$httpMethod = $_SERVER['REQUEST_METHOD'];
$uri = $_SERVER['REQUEST_URI'];

// Strip query string (?foo=bar) and decode URI
if(false !== $pos = strpos($uri, '?')){
    $uri = substr($uri, 0, $pos);
}
$uri = rawurldecode($uri);

$routeInfo = $dispatcher->dispatch($httpMethod, $uri);
switch ($routeInfo[0]) {
    case FastRoute\Dispatcher::NOT_FOUND:
        // ... 404 Not Found
        break;
    case FastRoute\Dispatcher::METHOD_NOT_ALLOWED:
        $allowedMethods = $routeInfo[1];
        // ... 405 Method Not Allowed
        break;
    case FastRoute\Dispatcher::FOUND:
        $handler = $routeInfo[1];
        $vars = $routeInfo[2];
        list($class, $method) = explode("/", $handler, 2);
        // dependency injection
        $container = new DI\Container();
        $redBean = $container->call('RedBeanPHP\R');
        $container->get($redBean);

        call_user_func_array([new $class, $method], $vars);
        break;
}