1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the core-bundle package. |
5
|
|
|
* |
6
|
|
|
* (c) 2019 WEBEWEB |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace WBW\Bundle\CoreBundle\Icon\MaterialDesignIconicFont; |
13
|
|
|
|
14
|
|
|
use WBW\Bundle\CoreBundle\Icon\AbstractIcon; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Material Design Iconic Font icon. |
18
|
|
|
* |
19
|
|
|
* @author webeweb <https://github.com/webeweb/> |
20
|
|
|
* @package WBW\Bundle\CoreBundle\Icon\MaterialDesignIconicFont |
21
|
|
|
*/ |
22
|
|
|
class MaterialDesignIconicFontIcon extends AbstractIcon implements MaterialDesignIconicFontIconInterface { |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* Border. |
26
|
|
|
* |
27
|
|
|
* @var string |
28
|
|
|
*/ |
29
|
|
|
private $border; |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* Fixed width. |
33
|
|
|
* |
34
|
|
|
* @var bool |
35
|
|
|
*/ |
36
|
|
|
private $fixedWidth; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* Flip. |
40
|
|
|
* |
41
|
|
|
* @var string |
42
|
|
|
*/ |
43
|
|
|
private $flip; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* Pull. |
47
|
|
|
* |
48
|
|
|
* @var string |
49
|
|
|
*/ |
50
|
|
|
private $pull; |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* Rotate. |
54
|
|
|
* |
55
|
|
|
* @var string |
56
|
|
|
*/ |
57
|
|
|
private $rotate; |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* Size. |
61
|
|
|
* |
62
|
|
|
* @var string |
63
|
|
|
*/ |
64
|
|
|
private $size; |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* Spin. |
68
|
|
|
* |
69
|
|
|
* @var string |
70
|
|
|
*/ |
71
|
|
|
private $spin; |
72
|
|
|
|
73
|
|
|
/** |
74
|
|
|
* Constructor. |
75
|
|
|
*/ |
76
|
|
|
public function __construct() { |
77
|
|
|
parent::__construct(); |
78
|
|
|
$this->setFixedWidth(false); |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* {@inheritdoc} |
83
|
|
|
*/ |
84
|
|
|
public function getBorder() { |
85
|
|
|
return $this->border; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* {@inheritdoc} |
90
|
|
|
*/ |
91
|
|
|
public function getFixedWidth() { |
92
|
|
|
return $this->fixedWidth; |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* {@inheritdoc} |
97
|
|
|
*/ |
98
|
|
|
public function getFlip() { |
99
|
|
|
return $this->flip; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* {@inheritdoc} |
104
|
|
|
*/ |
105
|
|
|
public function getPull() { |
106
|
|
|
return $this->pull; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* {@inheritdoc} |
111
|
|
|
*/ |
112
|
|
|
public function getRotate() { |
113
|
|
|
return $this->rotate; |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* {@inheritdoc} |
118
|
|
|
*/ |
119
|
|
|
public function getSize() { |
120
|
|
|
return $this->size; |
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* {@inheritdoc} |
125
|
|
|
*/ |
126
|
|
|
public function getSpin() { |
127
|
|
|
return $this->spin; |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* {@inheritdoc} |
132
|
|
|
*/ |
133
|
|
|
public function setBorder($border) { |
134
|
|
|
if (false === in_array($border, MaterialDesignIconicFontIconEnumerator::enumBorders())) { |
135
|
|
|
$border = null; |
136
|
|
|
} |
137
|
|
|
$this->border = $border; |
138
|
|
|
return $this; |
139
|
|
|
} |
140
|
|
|
|
141
|
|
|
/** |
142
|
|
|
* {@inheritdoc} |
143
|
|
|
*/ |
144
|
|
|
public function setFixedWidth($fixedWidth) { |
145
|
|
|
$this->fixedWidth = $fixedWidth; |
146
|
|
|
return $this; |
147
|
|
|
} |
148
|
|
|
|
149
|
|
|
/** |
150
|
|
|
*{@inheritdoc} |
151
|
|
|
*/ |
152
|
|
|
public function setFlip($flip) { |
153
|
|
|
if (false === in_array($flip, MaterialDesignIconicFontIconEnumerator::enumFlips())) { |
154
|
|
|
$flip = null; |
155
|
|
|
} |
156
|
|
|
$this->flip = $flip; |
157
|
|
|
return $this; |
158
|
|
|
} |
159
|
|
|
|
160
|
|
|
/** |
161
|
|
|
* {@inheritdoc} |
162
|
|
|
*/ |
163
|
|
|
public function setPull($pull) { |
164
|
|
|
if (false === in_array($pull, MaterialDesignIconicFontIconEnumerator::enumPulls())) { |
165
|
|
|
$pull = null; |
166
|
|
|
} |
167
|
|
|
$this->pull = $pull; |
168
|
|
|
return $this; |
169
|
|
|
} |
170
|
|
|
|
171
|
|
|
/** |
172
|
|
|
* {@inheritdoc} |
173
|
|
|
*/ |
174
|
|
|
public function setRotate($rotate) { |
175
|
|
|
if (false === in_array($rotate, MaterialDesignIconicFontIconEnumerator::enumRotates())) { |
176
|
|
|
$rotate = null; |
177
|
|
|
} |
178
|
|
|
$this->rotate = $rotate; |
179
|
|
|
return $this; |
180
|
|
|
} |
181
|
|
|
|
182
|
|
|
/** |
183
|
|
|
* {@inheritdoc} |
184
|
|
|
*/ |
185
|
|
|
public function setSize($size) { |
186
|
|
|
if (false === in_array($size, MaterialDesignIconicFontIconEnumerator::enumSizes())) { |
187
|
|
|
$size = null; |
188
|
|
|
} |
189
|
|
|
$this->size = $size; |
190
|
|
|
return $this; |
191
|
|
|
} |
192
|
|
|
|
193
|
|
|
/** |
194
|
|
|
* {@inheritdoc} |
195
|
|
|
*/ |
196
|
|
|
public function setSpin($spin) { |
197
|
|
|
if (false === in_array($spin, MaterialDesignIconicFontIconEnumerator::enumSpins())) { |
198
|
|
|
$spin = null; |
199
|
|
|
} |
200
|
|
|
$this->spin = $spin; |
201
|
|
|
return $this; |
202
|
|
|
} |
203
|
|
|
} |
204
|
|
|
|