protected static function parseFilter($filter)
{
$parts = explode(',', $filter);
$filterName = strtolower(array_shift($parts));
$options = array();
foreach ($parts as $part) {
$part = trim($part);
if (empty($part)) {
continue;
}
list($name, $value) = explode(':', $part, 2);
$options[$name] = $value;
}
return array($filterName, $options);
}