1 | <?php |
||
35 | class Slide implements ComparableInterface, ShapeContainerInterface |
||
36 | { |
||
37 | /** |
||
38 | * Parent presentation |
||
39 | * |
||
40 | * @var PhpPresentation |
||
41 | */ |
||
42 | private $parent; |
||
43 | |||
44 | /** |
||
45 | * Collection of shapes |
||
46 | * |
||
47 | * @var \ArrayObject|\PhpOffice\PhpPresentation\AbstractShape[] |
||
48 | */ |
||
49 | private $shapeCollection = null; |
||
50 | |||
51 | /** |
||
52 | * Slide identifier |
||
53 | * |
||
54 | * @var string |
||
55 | */ |
||
56 | private $identifier; |
||
57 | |||
58 | /** |
||
59 | * Slide layout |
||
60 | * |
||
61 | * @var string |
||
62 | */ |
||
63 | private $slideLayout; |
||
64 | |||
65 | /** |
||
66 | * Slide master id |
||
67 | * |
||
68 | * @var integer |
||
69 | */ |
||
70 | private $slideMasterId = 1; |
||
71 | |||
72 | /** |
||
73 | * |
||
74 | * @var \PhpOffice\PhpPresentation\Slide\Note |
||
75 | */ |
||
76 | private $slideNote; |
||
77 | /** |
||
78 | * |
||
79 | * @var \PhpOffice\PhpPresentation\Slide\Transition |
||
80 | */ |
||
81 | private $slideTransition; |
||
82 | |||
83 | /** |
||
84 | * |
||
85 | * @var \PhpOffice\PhpPresentation\Slide\Animation |
||
86 | */ |
||
87 | private $animations = ARRAY(); |
||
|
|||
88 | |||
89 | /** |
||
90 | * Hash index |
||
91 | * |
||
92 | * @var string |
||
93 | */ |
||
94 | private $hashIndex; |
||
95 | |||
96 | /** |
||
97 | * Offset X |
||
98 | * |
||
99 | * @var int |
||
100 | */ |
||
101 | protected $offsetX; |
||
102 | |||
103 | /** |
||
104 | * Offset Y |
||
105 | * |
||
106 | * @var int |
||
107 | */ |
||
108 | protected $offsetY; |
||
109 | |||
110 | /** |
||
111 | * Extent X |
||
112 | * |
||
113 | * @var int |
||
114 | */ |
||
115 | protected $extentX; |
||
116 | |||
117 | /** |
||
118 | * Extent Y |
||
119 | * |
||
120 | * @var int |
||
121 | */ |
||
122 | protected $extentY; |
||
123 | |||
124 | /** |
||
125 | * Name of the title |
||
126 | * |
||
127 | * @var string |
||
128 | */ |
||
129 | protected $name; |
||
130 | |||
131 | /** |
||
132 | * Background of the slide |
||
133 | * |
||
134 | * @var AbstractBackground |
||
135 | */ |
||
136 | protected $background; |
||
137 | |||
138 | /** |
||
139 | * Create a new slide |
||
140 | * |
||
141 | * @param PhpPresentation $pParent |
||
142 | */ |
||
143 | 153 | public function __construct(PhpPresentation $pParent = null) |
|
156 | |||
157 | /** |
||
158 | * Get collection of shapes |
||
159 | * |
||
160 | * @return \ArrayObject|\PhpOffice\PhpPresentation\AbstractShape[] |
||
161 | */ |
||
162 | 121 | public function getShapeCollection() |
|
166 | |||
167 | /** |
||
168 | * Add shape to slide |
||
169 | * |
||
170 | * @param \PhpOffice\PhpPresentation\AbstractShape $shape |
||
171 | * @return \PhpOffice\PhpPresentation\AbstractShape |
||
172 | */ |
||
173 | 106 | public function addShape(AbstractShape $shape) |
|
179 | |||
180 | /** |
||
181 | * Create rich text shape |
||
182 | * |
||
183 | * @return \PhpOffice\PhpPresentation\Shape\RichText |
||
184 | */ |
||
185 | 40 | public function createRichTextShape() |
|
192 | |||
193 | /** |
||
194 | * Create line shape |
||
195 | * |
||
196 | * @param int $fromX Starting point x offset |
||
197 | * @param int $fromY Starting point y offset |
||
198 | * @param int $toX Ending point x offset |
||
199 | * @param int $toY Ending point y offset |
||
200 | * @return \PhpOffice\PhpPresentation\Shape\Line |
||
201 | */ |
||
202 | 3 | public function createLineShape($fromX, $fromY, $toX, $toY) |
|
209 | |||
210 | /** |
||
211 | * Create chart shape |
||
212 | * |
||
213 | * @return \PhpOffice\PhpPresentation\Shape\Chart |
||
214 | */ |
||
215 | 34 | public function createChartShape() |
|
222 | |||
223 | /** |
||
224 | * Create drawing shape |
||
225 | * |
||
226 | * @return \PhpOffice\PhpPresentation\Shape\Drawing |
||
227 | */ |
||
228 | 11 | public function createDrawingShape() |
|
235 | |||
236 | /** |
||
237 | * Create table shape |
||
238 | * |
||
239 | * @param int $columns Number of columns |
||
240 | * @return \PhpOffice\PhpPresentation\Shape\Table |
||
241 | */ |
||
242 | 17 | public function createTableShape($columns = 1) |
|
249 | |||
250 | /** |
||
251 | * Creates a group within this slide |
||
252 | * |
||
253 | * @return \PhpOffice\PhpPresentation\Shape\Group |
||
254 | */ |
||
255 | 4 | public function createGroup() |
|
262 | |||
263 | /** |
||
264 | * Get parent |
||
265 | * |
||
266 | * @return PhpPresentation |
||
267 | */ |
||
268 | 61 | public function getParent() |
|
272 | |||
273 | /** |
||
274 | * Re-bind parent |
||
275 | * |
||
276 | * @param \PhpOffice\PhpPresentation\PhpPresentation $parent |
||
277 | * @return \PhpOffice\PhpPresentation\Slide |
||
278 | */ |
||
279 | 2 | public function rebindParent(PhpPresentation $parent) |
|
286 | |||
287 | /** |
||
288 | * Get slide layout |
||
289 | * |
||
290 | * @return string |
||
291 | */ |
||
292 | 61 | public function getSlideLayout() |
|
296 | |||
297 | /** |
||
298 | * Set slide layout |
||
299 | * |
||
300 | * @param string $layout |
||
301 | * @return \PhpOffice\PhpPresentation\Slide |
||
302 | */ |
||
303 | 4 | public function setSlideLayout($layout = Layout::BLANK) |
|
309 | |||
310 | /** |
||
311 | * Get slide master id |
||
312 | * |
||
313 | * @return int |
||
314 | */ |
||
315 | 64 | public function getSlideMasterId() |
|
319 | |||
320 | /** |
||
321 | * Set slide master id |
||
322 | * |
||
323 | * @param int $masterId |
||
324 | * @return \PhpOffice\PhpPresentation\Slide |
||
325 | */ |
||
326 | 1 | public function setSlideMasterId($masterId = 1) |
|
332 | |||
333 | /** |
||
334 | * Get hash code |
||
335 | * |
||
336 | * @return string Hash code |
||
337 | */ |
||
338 | 85 | public function getHashCode() |
|
342 | |||
343 | /** |
||
344 | * Get hash index |
||
345 | * |
||
346 | * Note that this index may vary during script execution! Only reliable moment is |
||
347 | * while doing a write of a workbook and when changes are not allowed. |
||
348 | * |
||
349 | * @return string Hash index |
||
350 | */ |
||
351 | 4 | public function getHashIndex() |
|
355 | |||
356 | /** |
||
357 | * Set hash index |
||
358 | * |
||
359 | * Note that this index may vary during script execution! Only reliable moment is |
||
360 | * while doing a write of a workbook and when changes are not allowed. |
||
361 | * |
||
362 | * @param string $value Hash index |
||
363 | */ |
||
364 | 4 | public function setHashIndex($value) |
|
368 | |||
369 | /** |
||
370 | * Copy slide (!= clone!) |
||
371 | * |
||
372 | * @return \PhpOffice\PhpPresentation\Slide |
||
373 | */ |
||
374 | 1 | public function copy() |
|
380 | |||
381 | /** |
||
382 | * Get X Offset |
||
383 | * |
||
384 | * @return int |
||
385 | */ |
||
386 | 61 | public function getOffsetX() |
|
395 | |||
396 | /** |
||
397 | * Get Y Offset |
||
398 | * |
||
399 | * @return int |
||
400 | */ |
||
401 | 61 | public function getOffsetY() |
|
410 | |||
411 | /** |
||
412 | * Get X Extent |
||
413 | * |
||
414 | * @return int |
||
415 | */ |
||
416 | 61 | public function getExtentX() |
|
425 | |||
426 | /** |
||
427 | * Get Y Extent |
||
428 | * |
||
429 | * @return int |
||
430 | */ |
||
431 | 61 | public function getExtentY() |
|
440 | |||
441 | /** |
||
442 | * |
||
443 | * @return \PhpOffice\PhpPresentation\Slide\Note |
||
444 | */ |
||
445 | 101 | public function getNote() |
|
452 | |||
453 | /** |
||
454 | * |
||
455 | * @param \PhpOffice\PhpPresentation\Slide\Note $note |
||
456 | * @return \PhpOffice\PhpPresentation\Slide |
||
457 | */ |
||
458 | 102 | public function setNote(Note $note = null) |
|
465 | |||
466 | /** |
||
467 | * |
||
468 | * @return \PhpOffice\PhpPresentation\Slide\Transition |
||
469 | */ |
||
470 | 102 | public function getTransition() |
|
474 | |||
475 | /** |
||
476 | * |
||
477 | * @param \PhpOffice\PhpPresentation\Slide\Transition $transition |
||
478 | * @return \PhpOffice\PhpPresentation\Slide |
||
479 | */ |
||
480 | 3 | public function setTransition(Transition $transition = null) |
|
486 | |||
487 | /** |
||
488 | * Get the name of the slide |
||
489 | * @return string |
||
490 | */ |
||
491 | 43 | public function getName() |
|
495 | |||
496 | /** |
||
497 | * Set the name of the slide |
||
498 | * @param string $name |
||
499 | * @return $this |
||
500 | */ |
||
501 | 5 | public function setName($name = null) |
|
506 | |||
507 | /** |
||
508 | * @return AbstractBackground |
||
509 | */ |
||
510 | 102 | public function getBackground() |
|
514 | |||
515 | /** |
||
516 | * @param AbstractBackground $background |
||
517 | * @return $this |
||
518 | */ |
||
519 | 4 | public function setBackground(AbstractBackground $background = null) |
|
524 | |||
525 | /** |
||
526 | * Add an animation to the slide |
||
527 | * |
||
528 | * @param \PhpOffice\PhpPresentation\Slide\Animation |
||
529 | * @return \PhpOffice\PhpPresentation\Slide\Animation |
||
530 | */ |
||
531 | public function addAnimation($animation){ |
||
535 | |||
536 | /** |
||
537 | * Get collection of animations |
||
538 | * |
||
539 | * @return \PhpOffice\PhpPresentation\Slide\Animation |
||
540 | */ |
||
541 | |||
542 | 60 | public function getAnimations(){ |
|
545 | } |
||
546 |