mirror of
https://github.com/Karaka-Management/Resources.git
synced 2026-01-30 04:58:39 +00:00
26 lines
724 B
PHP
Executable File
26 lines
724 B
PHP
Executable File
<?php
|
|
|
|
namespace PhpOffice\PhpPresentation\Writer\PowerPoint2007;
|
|
|
|
use PhpOffice\PhpPresentation\Shape\Drawing\AbstractDrawingAdapter;
|
|
|
|
class PptMedia extends AbstractDecoratorWriter
|
|
{
|
|
/**
|
|
* @return \PhpOffice\Common\Adapter\Zip\ZipInterface
|
|
* @throws \Exception
|
|
*/
|
|
public function render()
|
|
{
|
|
for ($i = 0; $i < $this->getDrawingHashTable()->count(); ++$i) {
|
|
$shape = $this->getDrawingHashTable()->getByIndex($i);
|
|
if (!$shape instanceof AbstractDrawingAdapter) {
|
|
continue;
|
|
}
|
|
$this->getZip()->addFromString('ppt/media/' . $shape->getIndexedFilename(), $shape->getContents());
|
|
}
|
|
|
|
return $this->getZip();
|
|
}
|
|
}
|