orderBy = $orderBy; $this->order = $order; } public static function create(string $orderBy, ?string $order = null): self { if ($order === null) { $order = SearchParams::ORDER_ASC; } return new self($orderBy, $order); } /** * Get a field. */ public function getOrderBy(): string { return $this->orderBy; } /** * Get a direction. */ public function getOrder(): string { return $this->order; } }