kartik\mpdf\Pdf::execute PHP Method

execute() public method

Calls the mPDF method with parameters
public execute ( $method, $params = [] ) : mixed
return mixed
    public function execute($method, $params = [])
    {
        $api = $this->api;
        if (!method_exists($api, $method)) {
            throw new InvalidParamException("Invalid or undefined mPDF method '{$method}' passed to 'Pdf::execute'.");
        }
        if (!is_array($params)) {
            $params = [$params];
        }
        return call_user_func_array([$api, $method], $params);
    }