blob: deda65d35573830c2d638e3018c3d19fcd6527e2 [file] [log] [blame]
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01001<?php
2
3declare(strict_types=1);
4
5namespace Ddeboer\Imap\Search;
6
7/**
8 * Represents a raw expression.
9 */
10final class RawExpression implements ConditionInterface
11{
12 /**
13 * Text to be used for the condition.
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010014 */
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +020015 private string $expression;
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010016
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}