private static function getCallable($target, array $construct_args)
    {
        if (empty($target)) {
            throw new RuntimeException('No callable provided');
        }

        if (is_string($target)) {
            //is a class "classname::method"
            if (strpos($target, '::') === false) {
                $class = $target;
                $method = '__invoke';
            } else {
                list($class, $method) = explode('::', $target, 2);
            }

            if (!class_exists($class)) {
                throw new RuntimeException("The class {$class} does not exists");
            }

            $fn = new \ReflectionMethod($class, $method);

            if (!$fn->isStatic()) {
                $class = new \ReflectionClass($class);
                $instance = $class->hasMethod('__construct') ? $class->newInstanceArgs($construct_args) : $class->newInstance();
                $target = [$instance, $method];
            }
        }

        //if it's callable as is
        if (is_callable($target)) {
            return $target;
        }

        throw new RuntimeException('Invalid callable provided');
    }