public static function Conversion::swiftmailer_is_parameterized_header in Swift Mailer 8.2
Same name and namespace in other branches
- 8 src/Utility/Conversion.php \Drupal\swiftmailer\Utility\Conversion::swiftmailer_is_parameterized_header()
Checks whether a header is a parameterized header.
Parameters
string $key: The header key.
string $value: The header value.
Return value
bool TRUE if the provided header is a parameterized header, and otherwise FALSE.
See also
http://swift_mailer.org/docs/header-parameterized
1 call to Conversion::swiftmailer_is_parameterized_header()
- Conversion::swiftmailer_get_headertype in src/
Utility/ Conversion.php - Determines the header type based on the a header key and value.
File
- src/
Utility/ Conversion.php, line 87
Class
- Conversion
- @todo
Namespace
Drupal\swiftmailer\UtilityCode
public static function swiftmailer_is_parameterized_header($key, $value) {
// Assume the header is parameterized if there is at least one ;, always
// treat the Content-Type header as parameterized.
if (preg_match('/;/', $value) || $key == 'Content-Type') {
return TRUE;
}
else {
return FALSE;
}
}