| 1 | <?php |
||
| 7 | final class SimpleFilter extends Filter |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | private $field; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var FilterValue|null |
||
| 16 | */ |
||
| 17 | private $value; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * SimpleFilter constructor. |
||
| 21 | * @param string $field |
||
| 22 | * @param FilterValue|null $value |
||
| 23 | */ |
||
| 24 | public function __construct(string $field, FilterValue $value = null) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param string $field |
||
| 32 | * @param $value |
||
| 33 | * @return SimpleFilter |
||
| 34 | */ |
||
| 35 | public static function createFromValue(string $field, $value): self |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @inheritDoc |
||
| 42 | */ |
||
| 43 | public function getField(): string |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return mixed |
||
| 50 | */ |
||
| 51 | public function getValue() |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return FilterValue|null |
||
| 58 | */ |
||
| 59 | public function getFilterValue(): ?FilterValue |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @inheritDoc |
||
| 66 | */ |
||
| 67 | public function getType(): string |
||
| 71 | |||
| 72 | /** |
||
| 73 | * @inheritDoc |
||
| 74 | */ |
||
| 75 | public function jsonSerialize(): array |
||
| 93 | } |
||
| 94 |