private function initDirection()
{
if (null !== $this->orderBy) {
switch ($this->direction) {
case 'ASC':
case 'DESC':
$this->orderBy = [$this->orderBy => $this->direction];
break;
default:
throw new \InvalidArgumentException(sprintf('"direction" option should be set with "orderBy" and should be ASC or DESC'));
break;
}
}
}