ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
CellFill.php
Go to the documentation of this file.
1<?php
2
4
6
8{
12 protected static $fillStyleMap = [
13 Fill::FILL_NONE => 0x00,
14 Fill::FILL_SOLID => 0x01,
32 Fill::FILL_GRADIENT_LINEAR => 0x00, // does not exist in BIFF8
33 Fill::FILL_GRADIENT_PATH => 0x00, // does not exist in BIFF8
34 ];
35
36 public static function style(Fill $fill): int
37 {
38 $fillStyle = $fill->getFillType();
39
40 if (is_string($fillStyle) && array_key_exists($fillStyle, self::$fillStyleMap)) {
41 return self::$fillStyleMap[$fillStyle];
42 }
43
44 return self::$fillStyleMap[Fill::FILL_NONE];
45 }
46}
An exception for terminatinating execution or to throw for unit testing.