ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
CellBorder.php
Go to the documentation of this file.
1 <?php
2 
4 
6 
7 class CellBorder
8 {
12  protected static $styleMap = [
13  Border::BORDER_NONE => 0x00,
14  Border::BORDER_THIN => 0x01,
15  Border::BORDER_MEDIUM => 0x02,
16  Border::BORDER_DASHED => 0x03,
17  Border::BORDER_DOTTED => 0x04,
18  Border::BORDER_THICK => 0x05,
19  Border::BORDER_DOUBLE => 0x06,
20  Border::BORDER_HAIR => 0x07,
22  Border::BORDER_DASHDOT => 0x09,
27  ];
28 
29  public static function style(Border $border): int
30  {
31  $borderStyle = $border->getBorderStyle();
32 
33  if (is_string($borderStyle) && array_key_exists($borderStyle, self::$styleMap)) {
34  return self::$styleMap[$borderStyle];
35  }
36 
37  return self::$styleMap[Border::BORDER_NONE];
38  }
39 }
$border
getBorderStyle()
Get Border style.
Definition: Border.php:142