public static function call($func, array $args)
    {
        switch ($func) {
            case 'map':
                if (count($args) != 2) throw new \BadMethodCallException("Wrong parameter count for method Func::map");
                return self::map($args[0], $args[1]);
            case 'premap':
                if (count($args) != 2) throw new \BadMethodCallException("Wrong parameter count for method Func::premap");
                return self::premap($args[0], $args[1]);
            case 'to_data':
                if (count($args) != 1) throw new \BadMethodCallException("Wrong parameter count for method Func::to_data");
                return self::to_data($args[0]);
            case 'manipulate':
                if (count($args) != 2) throw new \BadMethodCallException("Wrong parameter count for method Func::manipulate");
                return self::manipulate($args[0], $args[1]);
            default:
                throw new \InvalidArgumentException(sprintf('Unknown function name provided: %s', (string)$func));
        }
    }