PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.3.21
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.3.21
1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 All 49 releases
fluent-cart / vendor / openspout / openspout / src / Common / Entity / Style / Border.php

Border.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler 1.3.21, at vendor/openspout/openspout/src/Common/Entity/Style/Border.php

71 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentCart\OpenSpout\Common\Entity\Style;
4
5 class Border
6 {
7 public const LEFT = 'left';
8 public const RIGHT = 'right';
9 public const TOP = 'top';
10 public const BOTTOM = 'bottom';
11 public const STYLE_NONE = 'none';
12 public const STYLE_SOLID = 'solid';
13 public const STYLE_DASHED = 'dashed';
14 public const STYLE_DOTTED = 'dotted';
15 public const STYLE_DOUBLE = 'double';
16 public const WIDTH_THIN = 'thin';
17 public const WIDTH_MEDIUM = 'medium';
18 public const WIDTH_THICK = 'thick';
19 /** @var array A list of BorderPart objects for this border. */
20 private $parts = [];
21 public function __construct(array $borderParts = [])
22 {
23 $this->setParts($borderParts);
24 }
25 /**
26 * @param string $name The name of the border part
27 *
28 * @return null|BorderPart
29 */
30 public function getPart($name)
31 {
32 return $this->hasPart($name) ? $this->parts[$name] : null;
33 }
34 /**
35 * @param string $name The name of the border part
36 *
37 * @return bool
38 */
39 public function hasPart($name)
40 {
41 return isset($this->parts[$name]);
42 }
43 /**
44 * @return array
45 */
46 public function getParts()
47 {
48 return $this->parts;
49 }
50 /**
51 * Set BorderParts.
52 *
53 * @param array $parts
54 */
55 public function setParts($parts)
56 {
57 $this->parts = [];
58 foreach ($parts as $part) {
59 $this->addPart($part);
60 }
61 }
62 /**
63 * @return Border
64 */
65 public function addPart(BorderPart $borderPart)
66 {
67 $this->parts[$borderPart->getName()] = $borderPart;
68 return $this;
69 }
70 }
71