protected function handleAsCallable(
        $action,
        array $arguments
    ) {
        if (is_array($action)
            && isset($action[0])
            && isset($action[1])
            && is_string($action[0])
            && is_string($action[1])
            && class_exists($action[0])
        ) {
            // ["SomeClass", "someMethod"] but not static
            $refl = new \ReflectionMethod($action[0], $action[1]);
            if ($refl->isPublic() && !$refl->isStatic()) {
                $obj = new $action[0]();
                return $obj->{$action[1]}(...$arguments);
            }
        }

        // Add $di to param list, if defined by the callback
        $refl = is_array($action)
            ? new \ReflectionMethod($action[0], $action[1])
            : new \ReflectionFunction($action);
        $params = $refl->getParameters();
        if (isset($params[0]) && $params[0]->getName() === "di") {
            array_unshift($arguments, $this->di);
        }

        return call_user_func($action, ...$arguments);
    }