public function sortDirection() { switch ($this->sort_by) { case 0: return 'DESC'; case 1: return 'DESC'; case 2: return 'ASC'; default: return 'DESC'; } }