|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
-
-
-
-
- namespace common\helpers;
-
- class Opendistrib
- {
-
- public static function getVersions()
- {
- $versionsArray = [];
- $pathVersions = Yii::getAlias('@common/versions');
-
- if(is_dir($pathVersions))
- {
- $directory = opendir($pathVersions);
- while( $child = readdir($directory) ){
- if($child != '.' && $child != '..'){
- $version = str_replace('.php', '', $child);
- $versionsArray[] = $version;
- }
- }
- }
-
- krsort($versionsArray);
-
- return $versionsArray;
- }
- }
|