ZipPlatform.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace PhpZip\Constants;
  3. /**
  4. * Class ZipPlatform.
  5. */
  6. final class ZipPlatform
  7. {
  8. /** @var int MS-DOS OS */
  9. const OS_DOS = 0;
  10. /** @var int Unix OS */
  11. const OS_UNIX = 3;
  12. /** MacOS platform */
  13. const OS_MAC_OSX = 19;
  14. /** @var array Zip Platforms */
  15. private static $platforms = [
  16. self::OS_DOS => 'MS-DOS',
  17. 1 => 'Amiga',
  18. 2 => 'OpenVMS',
  19. self::OS_UNIX => 'Unix',
  20. 4 => 'VM/CMS',
  21. 5 => 'Atari ST',
  22. 6 => 'HPFS (OS/2, NT 3.x)',
  23. 7 => 'Macintosh',
  24. 8 => 'Z-System',
  25. 9 => 'CP/M',
  26. 10 => 'Windows NTFS or TOPS-20',
  27. 11 => 'MVS or NTFS',
  28. 12 => 'VSE or SMS/QDOS',
  29. 13 => 'Acorn RISC OS',
  30. 14 => 'VFAT',
  31. 15 => 'alternate MVS',
  32. 16 => 'BeOS',
  33. 17 => 'Tandem',
  34. 18 => 'OS/400',
  35. self::OS_MAC_OSX => 'OS/X (Darwin)',
  36. 30 => 'AtheOS/Syllable',
  37. ];
  38. /**
  39. * @param int $platform
  40. *
  41. * @return string
  42. */
  43. public static function getPlatformName($platform)
  44. {
  45. return isset(self::$platforms[$platform]) ? self::$platforms[$platform] : 'Unknown';
  46. }
  47. }