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;
    }
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;
    }
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 ; }
Applies data to email view

@param string $view
@param array  $data

@return string
Applies data to email view