| 1 | <?php | ||
| 14 | class FilterResult | ||
| 15 | { | ||
| 16 | /** | ||
| 17 | * @var bool | ||
| 18 | */ | ||
| 19 | protected $isSet; | ||
| 20 | |||
| 21 | /** | ||
| 22 | * @var mixed | ||
| 23 | */ | ||
| 24 | protected $filteredValue; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * @param bool $isSet | ||
| 28 | * @param null|mixed $filteredValue | ||
| 29 | */ | ||
| 30 | 147 | public function __construct($isSet, $filteredValue = null) | |
| 31 |     { | ||
| 32 | 147 | $this->isSet = $isSet; | |
| 33 | 147 | $this->filteredValue = $filteredValue; | |
| 34 | 147 | } | |
| 35 | |||
| 36 | /** | ||
| 37 | * Is the filter result not empty | ||
| 38 | * | ||
| 39 | * @return bool | ||
| 40 | */ | ||
| 41 | 145 | public function isNotEmpty() | |
| 45 | |||
| 46 | /** | ||
| 47 | * Get the filtered value | ||
| 48 | * | ||
| 49 | * @return mixed|null | ||
| 50 | */ | ||
| 51 | 146 | public function getFilteredValue() | |
| 55 | } | ||
| 56 |