Completed
Pull Request — develop (#545)
by Franck
19:28 queued 06:47
created

AutoShape   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 238
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 238
ccs 0
cts 22
cp 0
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getText() 0 4 1
A setText() 0 5 1
A getType() 0 4 1
A setType() 0 5 1
1
<?php
2
/**
3
 * This file is part of PHPPresentation - A pure PHP library for reading and writing
4
 * presentations documents.
5
 *
6
 * PHPPresentation is free software distributed under the terms of the GNU Lesser
7
 * General Public License version 3 as published by the Free Software Foundation.
8
 *
9
 * For the full copyright and license information, please read the LICENSE
10
 * file that was distributed with this source code. For the full list of
11
 * contributors, visit https://github.com/PHPOffice/PHPPresentation/contributors.
12
 *
13
 * @link        https://github.com/PHPOffice/PHPPresentation
14
 * @copyright   2009-2015 PHPPresentation contributors
15
 * @license     http://www.gnu.org/licenses/lgpl.txt LGPL version 3
16
 */
17
18
namespace PhpOffice\PhpPresentation\Shape;
19
20
use PhpOffice\PhpPresentation\AbstractShape;
21
use PhpOffice\PhpPresentation\ComparableInterface;
22
23
/**
24
 * AutoShape shape
25
 *
26
 * @link : https://github.com/scanny/python-pptx/blob/eaa1e0fd3db28b03a353e116a5c7d2084dd87c26/pptx/enum/shapes.py
27
 */
28
class AutoShape extends AbstractShape implements ComparableInterface
29
{
30
    const TYPE_10_POINT_STAR = 'star10';
31
    const TYPE_12_POINT_STAR = 'star12';
32
    const TYPE_16_POINT_STAR = 'star16';
33
    const TYPE_24_POINT_STAR = 'star24';
34
    const TYPE_32_POINT_STAR = 'star32';
35
    const TYPE_4_POINT_STAR = 'star4';
36
    const TYPE_5_POINT_STAR = 'star5';
37
    const TYPE_6_POINT_STAR = 'star6';
38
    const TYPE_7_POINT_STAR = 'star7';
39
    const TYPE_8_POINT_STAR = 'star8';
40
    const TYPE_ACTION_BUTTON_BACK_OR_PREVIOUS = 'actionButtonBackPrevious';
41
    const TYPE_ACTION_BUTTON_BEGINNING = 'actionButtonBeginning';
42
    const TYPE_ACTION_BUTTON_CUSTOM = 'actionButtonBlank';
43
    const TYPE_ACTION_BUTTON_DOCUMENT = 'actionButtonDocument';
44
    const TYPE_ACTION_BUTTON_END = 'actionButtonEnd';
45
    const TYPE_ACTION_BUTTON_FORWARD_OR_NEXT = 'actionButtonForwardNext';
46
    const TYPE_ACTION_BUTTON_HELP = 'actionButtonHelp';
47
    const TYPE_ACTION_BUTTON_HOME = 'actionButtonHome';
48
    const TYPE_ACTION_BUTTON_INFORMATION = 'actionButtonInformation';
49
    const TYPE_ACTION_BUTTON_MOVIE = 'actionButtonMovie';
50
    const TYPE_ACTION_BUTTON_RETURN = 'actionButtonReturn';
51
    const TYPE_ACTION_BUTTON_SOUND = 'actionButtonSound';
52
    const TYPE_ARC = 'arc';
53
    const TYPE_BALLOON = 'wedgeRoundRectCallout';
54
    const TYPE_BENT_ARROW = 'bentArrow';
55
    const TYPE_BENT_UP_ARROW = 'bentUpArrow';
56
    const TYPE_BEVEL = 'bevel';
57
    const TYPE_BLOCK_ARC = 'blockArc';
58
    const TYPE_CAN = 'can';
59
    const TYPE_CHART_PLUS = 'chartPlus';
60
    const TYPE_CHART_STAR = 'chartStar';
61
    const TYPE_CHARTX = 'chartX';
62
    const TYPE_CHEVRON = 'chevron';
63
    const TYPE_CHORD = 'chord';
64
    const TYPE_CIRCULAR_ARROW = 'circularArrow';
65
    const TYPE_CLOUD = 'cloud';
66
    const TYPE_CLOUD_CALLOUT = 'cloudCallout';
67
    const TYPE_CORNER = 'corner';
68
    const TYPE_CORNER_TABS = 'cornerTabs';
69
    const TYPE_CROSS = 'plus';
70
    const TYPE_CUBE = 'cube';
71
    const TYPE_CURVED_DOWN_ARROW = 'curvedDownArrow';
72
    const TYPE_CURVED_DOWN_RIBBON = 'ellipseRibbon';
73
    const TYPE_CURVED_LEFT_ARROW = 'curvedLeftArrow';
74
    const TYPE_CURVED_RIGHT_ARROW = 'curvedRightArrow';
75
    const TYPE_CURVED_UP_ARROW = 'curvedUpArrow';
76
    const TYPE_CURVED_UP_RIBBON = 'ellipseRibbon2';
77
    const TYPE_DECAGON = 'decagon';
78
    const TYPE_DIAGONALSTRIPE = 'diagStripe';
79
    const TYPE_DIAMOND = 'diamond';
80
    const TYPE_DODECAGON = 'dodecagon';
81
    const TYPE_DONUT = 'donut';
82
    const TYPE_DOUBLE_BRACE = 'bracePair';
83
    const TYPE_DOUBLE_BRACKET = 'bracketPair';
84
    const TYPE_DOUBLE_WAVE = 'doubleWave';
85
    const TYPE_DOWN_ARROW = 'downArrow';
86
    const TYPE_DOWN_ARROWCALLOUT = 'downArrowCallout';
87
    const TYPE_DOWN_RIBBON = 'ribbon';
88
    const TYPE_EXPLOSIONEXPLOSION1 = 'irregularSeal1';
89
    const TYPE_EXPLOSIONEXPLOSION2 = 'irregularSeal2';
90
    const TYPE_FLOWCHART_ALTERNATEPROCESS = 'flowChartAlternateProcess';
91
    const TYPE_FLOWCHART_CARD = 'flowChartPunchedCard';
92
    const TYPE_FLOWCHART_COLLATE = 'flowChartCollate';
93
    const TYPE_FLOWCHART_CONNECTOR = 'flowChartConnector';
94
    const TYPE_FLOWCHART_DATA = 'flowChartInputOutput';
95
    const TYPE_FLOWCHART_DECISION = 'flowChartDecision';
96
    const TYPE_FLOWCHART_DELAY = 'flowChartDelay';
97
    const TYPE_FLOWCHART_DIRECT_ACCESS_STORAGE = 'flowChartMagneticDrum';
98
    const TYPE_FLOWCHART_DISPLAY = 'flowChartDisplay';
99
    const TYPE_FLOWCHART_DOCUMENT = 'flowChartDocument';
100
    const TYPE_FLOWCHART_EXTRACT = 'flowChartExtract';
101
    const TYPE_FLOWCHART_INTERNAL_STORAGE = 'flowChartInternalStorage';
102
    const TYPE_FLOWCHART_MAGNETIC_DISK = 'flowChartMagneticDisk';
103
    const TYPE_FLOWCHART_MANUAL_INPUT = 'flowChartManualInput';
104
    const TYPE_FLOWCHART_MANUAL_OPERATION = 'flowChartManualOperation';
105
    const TYPE_FLOWCHART_MERGE = 'flowChartMerge';
106
    const TYPE_FLOWCHART_MULTIDOCUMENT = 'flowChartMultidocument';
107
    const TYPE_FLOWCHART_OFFLINE_STORAGE = 'flowChartOfflineStorage';
108
    const TYPE_FLOWCHART_OFFPAGE_CONNECTOR = 'flowChartOffpageConnector';
109
    const TYPE_FLOWCHART_OR = 'flowChartOr';
110
    const TYPE_FLOWCHART_PREDEFINED_PROCESS = 'flowChartPredefinedProcess';
111
    const TYPE_FLOWCHART_PREPARATION = 'flowChartPreparation';
112
    const TYPE_FLOWCHART_PROCESS = 'flowChartProcess';
113
    const TYPE_FLOWCHART_PUNCHEDTAPE = 'flowChartPunchedTape';
114
    const TYPE_FLOWCHART_SEQUENTIAL_ACCESS_STORAGE = 'flowChartMagneticTape';
115
    const TYPE_FLOWCHART_SORT = 'flowChartSort';
116
    const TYPE_FLOWCHART_STORED_DATA = 'flowChartOnlineStorage';
117
    const TYPE_FLOWCHART_SUMMING_JUNCTION = 'flowChartSummingJunction';
118
    const TYPE_FLOWCHART_TERMINATOR = 'flowChartTerminator';
119
    const TYPE_FOLDED_CORNER = 'foldedCorner';
120
    const TYPE_FRAME = 'frame';
121
    const TYPE_FUNNEL = 'funnel';
122
    const TYPE_GEAR_6 = 'gear6';
123
    const TYPE_GEAR_9 = 'gear9';
124
    const TYPE_HALF_FRAME = 'halfFrame';
125
    const TYPE_HEART = 'heart';
126
    const TYPE_HEPTAGON = 'heptagon';
127
    const TYPE_HEXAGON = 'hexagon';
128
    const TYPE_HORIZONTAL_SCROLL = 'horizontalScroll';
129
    const TYPE_ISOSCELES_TRIANGLE = 'triangle';
130
    const TYPE_LEFT_ARROW = 'leftArrow';
131
    const TYPE_LEFT_ARROW_CALLOUT = 'leftArrowCallout';
132
    const TYPE_LEFT_BRACE = 'leftBrace';
133
    const TYPE_LEFT_BRACKET = 'leftBracket';
134
    const TYPE_LEFT_CIRCULAR_ARROW = 'leftCircularArrow';
135
    const TYPE_LEFT_RIGHT_ARROW = 'leftRightArrow';
136
    const TYPE_LEFT_RIGHT_ARROW_CALLOUT = 'leftRightArrowCallout';
137
    const TYPE_LEFT_RIGHT_CIRCULAR_ARROW = 'leftRightCircularArrow';
138
    const TYPE_LEFT_RIGHT_RIBBON = 'leftRightRibbon';
139
    const TYPE_LEFT_RIGHT_UP_ARROW = 'leftRightUpArrow';
140
    const TYPE_LEFT_UP_ARROW = 'leftUpArrow';
141
    const TYPE_LIGHTNING_BOLT = 'lightningBolt';
142
    const TYPE_LINE_CALLOUT_1 = 'borderCallout1';
143
    const TYPE_LINE_CALLOUT_1_ACCENT_BAR = 'accentCallout1';
144
    const TYPE_LINE_CALLOUT_1_BORDER_AND_ACCENT_BAR = 'accentBorderCallout1';
145
    const TYPE_LINE_CALLOUT_1_NO_BORDER = 'callout1';
146
    const TYPE_LINE_CALLOUT_2 = 'borderCallout2';
147
    const TYPE_LINE_CALLOUT_2_ACCENT_BAR = 'accentCallout2';
148
    const TYPE_LINE_CALLOUT_2_BORDER_AND_ACCENT_BAR = 'accentBorderCallout2';
149
    const TYPE_LINE_CALLOUT_2_NO_BORDER = 'callout2';
150
    const TYPE_LINE_CALLOUT_3 = 'borderCallout3';
151
    const TYPE_LINE_CALLOUT_3_ACCENT_BAR = 'accentCallout3';
152
    const TYPE_LINE_CALLOUT_3_BORDER_AND_ACCENT_BAR = 'accentBorderCallout3';
153
    const TYPE_LINE_CALLOUT_3_NO_BORDER = 'callout3';
154
    const TYPE_LINE_CALLOUT_4 = 'borderCallout4';
155
    const TYPE_LINE_CALLOUT_4_ACCENT_BAR = 'accentCallout4';
156
    const TYPE_LINE_CALLOUT_4_BORDER_AND_ACCENT_BAR = 'accentBorderCallout4';
157
    const TYPE_LINE_CALLOUT_4_NO_BORDER = 'callout4';
158
    const TYPE_LINE_INVERSE = 'lineInv';
159
    const TYPE_MATH_DIVIDE = 'mathDivide';
160
    const TYPE_MATH_EQUAL = 'mathEqual';
161
    const TYPE_MATH_MINUS = 'mathMinus';
162
    const TYPE_MATH_MULTIPLY = 'mathMultiply';
163
    const TYPE_MATH_NOT_EQUAL = 'mathNotEqual';
164
    const TYPE_MATH_PLUS = 'mathPlus';
165
    //const TYPE_MIXED = '';
166
    const TYPE_MOON = 'moon';
167
    const TYPE_NON_ISOSCELES_TRAPEZOID = 'nonIsoscelesTrapezoid';
168
    const TYPE_NO_SYMBOL = 'noSmoking';
169
    const TYPE_NOTCHED_RIGHT_ARROW = 'notchedRightArrow';
170
    //const TYPE_NOTPRIMITIVE = '';
171
    const TYPE_OCTAGON = 'octagon';
172
    const TYPE_OVAL = 'ellipse';
173
    const TYPE_OVAL_CALLOUT = 'wedgeEllipseCallout';
174
    const TYPE_PARALLELOGRAM = 'parallelogram';
175
    const TYPE_PENTAGON = 'homePlate';
176
    const TYPE_PIE = 'pie';
177
    const TYPE_PIE_WEDGE = 'pieWedge';
178
    const TYPE_PLAQUE = 'plaque';
179
    const TYPE_PLAQUE_TABS = 'plaqueTabs';
180
    const TYPE_QUAD_ARROW = 'quadArrow';
181
    const TYPE_QUAD_ARROW_CALLOUT = 'quadArrowCallout';
182
    const TYPE_RECTANGLE = 'rect';
183
    const TYPE_RECTANGULAR_CALLOUT = 'wedgeRectCallout';
184
    const TYPE_REGULARP_ENTAGON = 'pentagon';
185
    const TYPE_RIGHT_ARROW = 'rightArrow';
186
    const TYPE_RIGHT_ARROW_CALLOUT = 'rightArrowCallout';
187
    const TYPE_RIGHT_BRACE = 'rightBrace';
188
    const TYPE_RIGHT_BRACKET = 'rightBracket';
189
    const TYPE_RIGHT_TRIANGLE = 'rtTriangle';
190
    const TYPE_ROUND_1_RECTANGLE = 'round1Rect';
191
    const TYPE_ROUND_2_DIAG_RECTANGLE = 'round2DiagRect';
192
    const TYPE_ROUND_2_SAME_RECTANGLE = 'round2SameRect';
193
    const TYPE_ROUNDED_RECTANGLE = 'roundRect';
194
    const TYPE_ROUNDED_RECTANGULAR_CALLOUT = 'wedgeRoundRectCallout';
195
    const TYPE_SMILEY_FACE = 'smileyFace';
196
    const TYPE_SNIP_1_RECTANGLE = 'snip1Rect';
197
    const TYPE_SNIP_2_DIAG_RECTANGLE = 'snip2DiagRect';
198
    const TYPE_SNIP_2_SAME_RECTANGLE = 'snip2SameRect';
199
    const TYPE_SNIP_ROUND_RECTANGLE = 'snipRoundRect';
200
    const TYPE_SQUARE_TABS = 'squareTabs';
201
    const TYPE_STRIPED_RIGHT_ARROW = 'stripedRightArrow';
202
    const TYPE_SUN = 'sun';
203
    const TYPE_SWOOSH_ARROW = 'swooshArrow';
204
    const TYPE_TEAR = 'teardrop';
205
    const TYPE_TRAPEZOID = 'trapezoid';
206
    const TYPE_UP_ARROW = 'upArrow';
207
    const TYPE_UP_ARROW_CALLOUT = 'upArrowCallout';
208
    const TYPE_UP_DOWN_ARROW = 'upDownArrow';
209
    const TYPE_UP_DOWN_ARROW_CALLOUT = 'upDownArrowCallout';
210
    const TYPE_UP_RIBBON = 'ribbon2';
211
    const TYPE_U_TURN_ARROW = 'uturnArrow';
212
    const TYPE_VERTICAL_SCROLL = 'verticalScroll';
213
    const TYPE_WAVE = 'wave';
214
215
    /**
216
     * @var string
217
     */
218
    protected $text;
219
220
    /**
221
     * @var string
222
     */
223
    protected $type;
224
225
    public function __construct()
226
    {
227
        parent::__construct();
228
    }
229
230
    /**
231
     * @return string
232
     */
233
    public function getText()
234
    {
235
        return $this->text;
236
    }
237
238
    /**
239
     * @param string $text
240
     * @return AutoShape
241
     */
242
    public function setText($text)
243
    {
244
        $this->text = $text;
245
        return $this;
246
    }
247
248
    /**
249
     * @return string
250
     */
251
    public function getType()
252
    {
253
        return $this->type;
254
    }
255
256
    /**
257
     * @param string $type
258
     * @return AutoShape
259
     */
260
    public function setType($type)
261
    {
262
        $this->type = $type;
263
        return $this;
264
    }
265
}
266