1 | <?php |
||
8 | class Border |
||
9 | { |
||
10 | const LEFT = 'left'; |
||
11 | const RIGHT = 'right'; |
||
12 | const TOP = 'top'; |
||
13 | const BOTTOM = 'bottom'; |
||
14 | |||
15 | const STYLE_NONE = 'none'; |
||
16 | const STYLE_SOLID = 'solid'; |
||
17 | const STYLE_DASHED = 'dashed'; |
||
18 | const STYLE_DOTTED = 'dotted'; |
||
19 | const STYLE_DOUBLE = 'double'; |
||
20 | |||
21 | const WIDTH_THIN = 'thin'; |
||
22 | const WIDTH_MEDIUM = 'medium'; |
||
23 | const WIDTH_THICK = 'thick'; |
||
24 | |||
25 | /** @var array A list of BorderPart objects for this border. */ |
||
26 | private $parts = []; |
||
27 | |||
28 | /** |
||
29 | * @param array $borderParts |
||
30 | */ |
||
31 | 12 | public function __construct(array $borderParts = []) |
|
35 | |||
36 | /** |
||
37 | * @param string $name The name of the border part |
||
38 | * @return BorderPart|null |
||
39 | */ |
||
40 | 4 | public function getPart($name) |
|
44 | |||
45 | /** |
||
46 | * @param string $name The name of the border part |
||
47 | * @return bool |
||
48 | */ |
||
49 | 4 | public function hasPart($name) |
|
53 | |||
54 | /** |
||
55 | * @return array |
||
56 | */ |
||
57 | 5 | public function getParts() |
|
61 | |||
62 | /** |
||
63 | * Set BorderParts |
||
64 | * @param array $parts |
||
65 | * @return void |
||
66 | */ |
||
67 | 12 | public function setParts($parts) |
|
74 | |||
75 | /** |
||
76 | * @param BorderPart $borderPart |
||
77 | * @return Border |
||
78 | */ |
||
79 | 12 | public function addPart(BorderPart $borderPart) |
|
85 | } |
||
86 |