protected function getSortFlags()
{
$constants = $this->arrayFromArrayOrTraversableOrCSV($this->arguments['sortFlags']);
$flags = 0;
foreach ($constants as $constant) {
if (false === in_array($constant, $this->allowedSortFlags)) {
throw new Exception('The constant "' . $constant . '" you\'re trying to use as a sortFlag is not allowed. Allowed ' . 'constants are: ' . implode(', ', $this->allowedSortFlags) . '.', 1404220538);
}
$flags = $flags | constant(trim($constant));
}
return $flags;
}