date = $date; $this->dateFormat = $dateFormat; } /** * Converts the condition to a string that can be sent to the IMAP server. */ final public function toString(): string { return \sprintf('%s "%s"', $this->getKeyword(), $this->date->format($this->dateFormat)); } /** * Returns the keyword that the condition represents. */ abstract protected function getKeyword(): string; }