public function getSorting()
{
$sorting = null;
$rules = $this->getRules();
if (!empty($rules[static::RULE_TYPE_SORTING][static::RULE_TYPE_PROP_DEFAULT])) {
if (!is_array($rules[static::RULE_TYPE_SORTING][static::RULE_TYPE_PROP_DEFAULT])) {
throw new \InvalidArgumentException(sprintf("[%s::RULE_TYPE_SORTING]['%s'] offset of the rules is expected to be an array", get_class($this), static::RULE_TYPE_PROP_DEFAULT));
}
$sorting = $rules[static::RULE_TYPE_SORTING][static::RULE_TYPE_PROP_DEFAULT];
}
return $sorting;
}