| 1 | <?php |
||
| 5 | class Color implements FcmResource |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var float|null |
||
| 9 | */ |
||
| 10 | protected $red; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var float|null |
||
| 14 | */ |
||
| 15 | protected $green; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var float|null |
||
| 19 | */ |
||
| 20 | protected $blue; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var float|null |
||
| 24 | */ |
||
| 25 | protected $alpha; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return static |
||
| 29 | */ |
||
| 30 | public static function create(): self |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return float|null |
||
| 37 | */ |
||
| 38 | public function getRed(): ?float |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param float|null $red |
||
| 45 | * @return Color |
||
| 46 | */ |
||
| 47 | public function setRed(?float $red): self |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return float|null |
||
| 56 | */ |
||
| 57 | public function getGreen(): ?float |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @param float|null $green |
||
| 64 | * @return Color |
||
| 65 | */ |
||
| 66 | public function setGreen(?float $green): self |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @return float|null |
||
| 75 | */ |
||
| 76 | public function getBlue(): ?float |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @param float|null $blue |
||
| 83 | * @return Color |
||
| 84 | */ |
||
| 85 | public function setBlue(?float $blue): self |
||
| 91 | |||
| 92 | /** |
||
| 93 | * @return float|null |
||
| 94 | */ |
||
| 95 | public function getAlpha(): ?float |
||
| 99 | |||
| 100 | /** |
||
| 101 | * @param float|null $alpha |
||
| 102 | * @return Color |
||
| 103 | */ |
||
| 104 | public function setAlpha(?float $alpha): self |
||
| 110 | |||
| 111 | /** |
||
| 112 | * {@inheritdoc} |
||
| 113 | */ |
||
| 114 | public function toArray(): array |
||
| 123 | } |
||
| 124 |