Eko\FeedBundle\Service\FeedDumpService::initDirection PHP Method

initDirection() private method

Initialize ordering.
private initDirection ( )
    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;
            }
        }
    }