Skip to content

Commit 8381601

Browse files
committed
#123 : Support for Video (Fix PHPUnit tests)
1 parent 0a4c6c1 commit 8381601

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/PhpPresentation/Writer/ODPresentation.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,26 @@ public function save($pFilename)
9999
$oPresentation = $this->getPhpPresentation();
100100
$arrayChart = array();
101101

102+
$arrayFiles = array();
102103
$oDir = new DirectoryIterator(dirname(__FILE__).DIRECTORY_SEPARATOR.'ODPresentation');
103104
foreach ($oDir as $oFile) {
104105
if (!$oFile->isFile()) {
105106
continue;
106107
}
107-
$class = __NAMESPACE__.'\\ODPresentation\\'.$oFile->getBasename('.php');
108+
109+
$class = __NAMESPACE__ . '\\ODPresentation\\' . $oFile->getBasename('.php');
108110
$o = new \ReflectionClass($class);
109111

110112
if ($o->isAbstract() || !$o->isSubclassOf('PhpOffice\PhpPresentation\Writer\ODPresentation\AbstractDecoratorWriter')) {
111113
continue;
112114
}
113-
echo "\n".dirname(__FILE__).DIRECTORY_SEPARATOR.'ODPresentation'."/".$oFile->getBasename('.php')."\n";
115+
$arrayFiles[$oFile->getBasename('.php')] = $o;
116+
}
117+
118+
ksort($arrayFiles);
119+
120+
foreach ($arrayFiles as $basename => $o) {
121+
echo "\n".dirname(__FILE__).DIRECTORY_SEPARATOR.'ODPresentation'."/".$basename."\n";
114122
$oService = $o->newInstance();
115123
$oService->setZip($oZip);
116124
$oService->setPresentation($oPresentation);

0 commit comments

Comments
 (0)