| 1 | <?php |
||
| 10 | abstract class AbstractEmail extends AbstractCondition |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Email address for the condition. |
||
| 14 | * |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $email; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Constructor |
||
| 21 | * |
||
| 22 | * @param string $email Optional email address for the condition. |
||
| 23 | */ |
||
| 24 | public function __construct($email = null) |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Sets the email address for the condition. |
||
| 33 | * |
||
| 34 | * @param string $email |
||
| 35 | */ |
||
| 36 | public function setEmail($email) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Converts the condition to a string that can be sent to the IMAP server. |
||
| 43 | * |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | public function __toString() |
||
| 50 | } |
||
| 51 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: