protected function getStyleFromString($string)
{
$style = array();
if (!is_string($string)) {
return $style;
}
foreach (explode(';', $string) as $sub) {
$arr = explode(':', $sub);
if (isset($arr[1]) && trim($arr[0]) !== '') {
$style[trim($arr[0])] = trim($arr[1]);
}
}
return $style;
}