field = $field; $this->direction = $direction; } public static function buildAscFor($field) { return new OrderElement($field, 'ASC'); } public static function buildDescFor($field) { return new OrderElement($field, 'DESC'); } /** * @return string */ public function getField() { return $this->field; } public function isAsc() { return $this->direction === 'ASC'; } /** * @return string */ public function getDirection() { return $this->direction; } }