1 | <?php |
||
11 | abstract class AbstractDate extends AbstractCondition |
||
12 | { |
||
13 | /** |
||
14 | * Format for dates to be sent to the IMAP server. |
||
15 | * |
||
16 | * @var string |
||
17 | */ |
||
18 | const DATE_FORMAT = 'Y-m-d'; |
||
19 | |||
20 | /** |
||
21 | * The date to be used for the condition. |
||
22 | * |
||
23 | * @var DateTime |
||
24 | */ |
||
25 | protected $date; |
||
26 | |||
27 | /** |
||
28 | * Constructor. |
||
29 | * |
||
30 | * @param DateTime $date Optional date for the condition. |
||
31 | */ |
||
32 | public function __construct(DateTime $date = null) |
||
38 | |||
39 | /** |
||
40 | * Sets the date for the condition. |
||
41 | * |
||
42 | * @param DateTime $date |
||
43 | */ |
||
44 | public function setDate(DateTime $date) |
||
48 | |||
49 | /** |
||
50 | * Converts the condition to a string that can be sent to the IMAP server. |
||
51 | * |
||
52 | * @return string |
||
53 | */ |
||
54 | public function __toString() |
||
58 | } |
||
59 |