protected function parseRule($rule)
{
$properties = ['rule' => '', 'attributes' => []];
// Check if attributes are defined...
if (0 < strpos($rule, ':')) {
$extract = explode(':', $rule);
// The rule
$properties['rule'] = $extract[0];
// The attributes
$properties['attributes'] = $this->getAttributes($extract[1]);
} else {
// No attributes, simply defined the rule.
// Leave attributes as empty array.
$properties['rule'] = $rule;
}
return $properties;
}