| Conditions | 5 |
| Paths | 9 |
| Total Lines | 22 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 5 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | 57 | public function render() |
|
| 16 | { |
||
| 17 | 57 | $arrMedia = array(); |
|
| 18 | 57 | for ($i = 0; $i < $this->getDrawingHashTable()->count(); ++$i) { |
|
| 19 | 28 | $shape = $this->getDrawingHashTable()->getByIndex($i); |
|
| 20 | 28 | if (!($shape instanceof Drawing\AbstractDrawingAdapter)) { |
|
| 21 | 21 | continue; |
|
| 22 | } |
||
| 23 | 8 | $arrMedia[] = $shape->getIndexedFilename(); |
|
| 24 | 8 | $this->getZip()->addFromString('Pictures/' . $shape->getIndexedFilename(), $shape->getContents()); |
|
| 25 | } |
||
| 26 | |||
| 27 | 57 | foreach ($this->getPresentation()->getAllSlides() as $keySlide => $oSlide) { |
|
| 28 | // Add background image slide |
||
| 29 | 57 | $oBkgImage = $oSlide->getBackground(); |
|
| 30 | 57 | if ($oBkgImage instanceof Image) { |
|
| 31 | 57 | $this->getZip()->addFromString('Pictures/'.$oBkgImage->getIndexedFilename($keySlide), file_get_contents($oBkgImage->getPath())); |
|
| 32 | } |
||
| 33 | } |
||
| 34 | |||
| 35 | 57 | return $this->getZip(); |
|
| 36 | } |
||
| 37 | } |
||
| 38 |