tablepress
/
libraries
/
vendor
/
PhpSpreadsheet
/
Style
/
ConditionalFormatting
/
ConditionalFormatValueObject.php
ConditionalFormatValueObject.php in TablePress – Tables in WordPress made easy 3.4, at libraries/vendor/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormatValueObject.php
| 1 | <?php |
| 2 | |
| 3 | namespace TablePress\PhpOffice\PhpSpreadsheet\Style\ConditionalFormatting; |
| 4 | |
| 5 | class ConditionalFormatValueObject |
| 6 | { |
| 7 | private string $type; |
| 8 | |
| 9 | /** |
| 10 | * @var null|float|int|string |
| 11 | */ |
| 12 | private $value; |
| 13 | |
| 14 | private ?string $cellFormula; |
| 15 | |
| 16 | /** |
| 17 | * For icon sets, determines whether this threshold value uses the greater |
| 18 | * than or equal to operator. False indicates 'greater than' is used instead |
| 19 | * of 'greater than or equal to'. |
| 20 | */ |
| 21 | private ?bool $greaterThanOrEqual = null; |
| 22 | |
| 23 | /** |
| 24 | * @param null|float|int|string $value |
| 25 | */ |
| 26 | public function __construct(string $type, $value = null, ?string $cellFormula = null) |
| 27 | { |
| 28 | $this->type = $type; |
| 29 | $this->value = $value; |
| 30 | $this->cellFormula = $cellFormula; |
| 31 | } |
| 32 | |
| 33 | public function getType(): string |
| 34 | { |
| 35 | return $this->type; |
| 36 | } |
| 37 | |
| 38 | public function setType(string $type): self |
| 39 | { |
| 40 | $this->type = $type; |
| 41 | |
| 42 | return $this; |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * @return null|float|int|string |
| 47 | */ |
| 48 | public function getValue() |
| 49 | { |
| 50 | return $this->value; |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * @param null|float|int|string $value |
| 55 | */ |
| 56 | public function setValue($value): self |
| 57 | { |
| 58 | $this->value = $value; |
| 59 | |
| 60 | return $this; |
| 61 | } |
| 62 | |
| 63 | public function getCellFormula(): ?string |
| 64 | { |
| 65 | return $this->cellFormula; |
| 66 | } |
| 67 | |
| 68 | public function setCellFormula(?string $cellFormula): self |
| 69 | { |
| 70 | $this->cellFormula = $cellFormula; |
| 71 | |
| 72 | return $this; |
| 73 | } |
| 74 | |
| 75 | public function getGreaterThanOrEqual(): ?bool |
| 76 | { |
| 77 | return $this->greaterThanOrEqual; |
| 78 | } |
| 79 | |
| 80 | public function setGreaterThanOrEqual(?bool $greaterThanOrEqual): self |
| 81 | { |
| 82 | $this->greaterThanOrEqual = $greaterThanOrEqual; |
| 83 | |
| 84 | return $this; |
| 85 | } |
| 86 | } |
| 87 |