setDate($date); } } /** * Sets the date for the condition. * * @param DateTime $date */ public function setDate(DateTime $date) { $this->date = $date; } /** * Converts the condition to a string that can be sent to the IMAP server. * * @return string. */ public function __toString() { return $this->getKeyword() . ' "' . $this->date->format(self::DATE_FORMAT) .'"'; } }