public static function applyDataToView($view, $data)
    {
        // do placeholder replacement, currently {xxx}
        if (!empty($data)) {
            foreach ($data as $name => $value) {
                if (is_string($value)) {
                    // replace {xxx} in subject
                    $view = str_replace('{' . $name . '}', $value, $view);
                }
            }
        }

        return $view;
    }