Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Ddeboer\Imap\Search; |
| 6 | |
| 7 | /** |
| 8 | * Represents a raw expression. |
| 9 | */ |
| 10 | final class RawExpression implements ConditionInterface |
| 11 | { |
| 12 | /** |
| 13 | * Text to be used for the condition. |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 14 | */ |
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame^] | 15 | private string $expression; |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 16 | |
| 17 | /** |
| 18 | * @param string $expression text for the condition |
| 19 | */ |
| 20 | public function __construct(string $expression) |
| 21 | { |
| 22 | $this->expression = $expression; |
| 23 | } |
| 24 | |
| 25 | public function toString(): string |
| 26 | { |
| 27 | return $this->expression; |
| 28 | } |
| 29 | } |