File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/PhpPresentation/Writer Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -99,18 +99,26 @@ public function save($pFilename)
99
99
$ oPresentation = $ this ->getPhpPresentation ();
100
100
$ arrayChart = array ();
101
101
102
+ $ arrayFiles = array ();
102
103
$ oDir = new DirectoryIterator (dirname (__FILE__ ).DIRECTORY_SEPARATOR .'ODPresentation ' );
103
104
foreach ($ oDir as $ oFile ) {
104
105
if (!$ oFile ->isFile ()) {
105
106
continue ;
106
107
}
107
- $ class = __NAMESPACE__ .'\\ODPresentation \\' .$ oFile ->getBasename ('.php ' );
108
+
109
+ $ class = __NAMESPACE__ . '\\ODPresentation \\' . $ oFile ->getBasename ('.php ' );
108
110
$ o = new \ReflectionClass ($ class );
109
111
110
112
if ($ o ->isAbstract () || !$ o ->isSubclassOf ('PhpOffice\PhpPresentation\Writer\ODPresentation\AbstractDecoratorWriter ' )) {
111
113
continue ;
112
114
}
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" ;
114
122
$ oService = $ o ->newInstance ();
115
123
$ oService ->setZip ($ oZip );
116
124
$ oService ->setPresentation ($ oPresentation );
You can’t perform that action at this time.
0 commit comments